summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-07-04signal.c: packed signalsnobu
* signal.c (signals): pack signal names instead of references. * signal.c (signm2signo): also reject too long signal name. [ruby-core:87767] [Bug #14893] reapply r63841 and r63842, which are unrelated to r63758 but had been wrongly reverted by r63852. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63854 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-04* 2018-07-05svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-04Revert r63758 and related commitsnaruse
The change is unstable on Windows. Please re-commit it when it correctly supports Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63852 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-04Fallback to Digest::SHA512kazu
`Gem::Package::TarWriter#add_file_signed` expects to fallback to `Digest::SHA512`, and `digest.respond_to? :name` or not. So lib/rubygems/security.rb should use same logic for `Gem::Security::DIGEST_ALGORITHM` and `Gem::Security::DIGEST_NAME`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63851 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-04Skip more rubygems tests when openssl is missingkazu
Some tests are already skipped, but some tests are not. So latter should be skipped too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-04Revert "Optimize Time.utc"naruse
This reverts commit r63848. It breaks tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-04Optimize Time.utcnaruse
Time.utc uses timegmw() and it uses leap second information. If the given time is larger than known_leap_seconds_limit, it calls find_time_t, which uses localtime(3) and calls stat(2) in it. This patch avoid it by setting known_leap_seconds_limit to 0 if the timezone doesn't have leapsecond information (if no leap second is found "now", I assume the timezone doesn't have leapsecond information). Before: % time ./miniruby --disable-gem -e'time = Time.now; year = time.year; month = time.month; day = time.day; hour = time.hour; min = time.min; sec = time.sec + time.subsec; i = 0; while i < 100000; ::Time.utc(year, month, day, hour, min, sec); i += 1; end' ./miniruby --disable-gem 0.35s user 0.19s system 99% cpu 0.542 total After: % time ./miniruby --disable-gem -e'time = Time.now; year = time.year; month = time.month; day = time.day; hour = time.hour; min = time.min; sec = time.sec + time.subsec; i = 0; while i < 100000; ::Time.utc(year, month, day, hour, min, sec); i += 1; end' ./miniruby --disable-gem 0.23s user 0.00s system 99% cpu 0.233 total git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-04internal.h (rb_warning_string): use PRINTF_ARGSnormal
Let compilers do a little extra validation for us git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-04thread_pthread.c: pass rb_vm_t to timer_thread_sleepnormal
I love `container_of' for generic data structures, but in this case it's unnecessary and slightly harder-to-read. This will make "Timeout in VM" slightly easier-to-read: https://bugs.ruby-lang.org/issues/14859 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-03vm.c: simplified core#hash_merge_kwdnobu
* vm.c (core_hash_merge_kwd): simplified to merge the second hash into the first hash. * compile.c (compile_array): call core#hash_merge_kwd with 2 hashes always, by passing an new empty hash to at the first iteration. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-03mjit.h: avoid signed pointer comparisons (fix for 32-bit)normal
ptrdiff_t is a signed type, use uintptr_t instead for unsigned comparisons. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-03* 2018-07-04svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-03Fix compile errorkazu
signal.c:69:10: error: variably modified ‘signm’ at file scope char signm[LONGEST_SIGNAME + 1]; ^ git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-03signal.c: packed signalsnobu
* signal.c (signals): pack signal names instead of references. * signal.c (signm2signo): also reject too long signal name. [ruby-core:87767] [Bug #14893] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63841 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-03adjust indent [ci skip]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-03skip test_localtime_zone if force_tz_test is falsenaruse
For example Solaris https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable10x/ruby-trunk/log/20180703T091803Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-03[DOC] Use https: instead of git: [ci skip]kazu
ref r63801, r61199 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-03vm.c (rb_source_location): check for NULL cfp->iseqnormal
rb_vm_get_sourceline returns zero if cfp->iseq is NULL, so rb_iseq_path should not try to follow NULL cfp->iseq, either. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63837 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-03thread_pthread.c (native_thread_destroy): clear native TSD pointernormal
mwrap <https://80x24.org/mwrap/> interposes malloc functions and checks for GVL existence to determine Ruby source locations of malloc calls. pthread_getattr_np (from get_stack) may call realloc to get the CPU set size; so when using the thread-cache, ruby_thread_has_gvl_p() may hit a false positive on reused threads with lingering rb_thread_t in thread-specific data. This was causing mwrap to call rb_source_location_cstr() and crash because it was pointed to a zero ec->cfp->iseq. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-03cont.c: handle errors for getcontext()nobu
It may raise an error in a certain security configuration. It is very likely to trigger a segmentation fault if `getcontext()` failed silently and we just let it keep going. Related to https://bugs.ruby-lang.org/issues/14883 [Fix GH-1903] Based on the patch from Lion Yang <lion@aosc.io> From: Lion Yang <lion@aosc.io> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-03fake.rb.in: duplicated RUBYOPTnobu
* template/fake.rb.in: removed duplicated options in RUBYOPT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-03rubyopt_spec.rb: skip -v in RUBYOPT examplesnobu
* spec/ruby/command_line/rubyopt_spec.rb: skip -v in RUBYOPT examples when CROSS_COMPILING is set by fake.rb. the version number by -v is printed before loading libraries by -r options, so setting RUBY_DESCRIPTION in fake.rb has no effect. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-03configure.ac: [DOC] refine help messagesnobu
cflags, cppflags, and cxxflags are additional flags to auto configured flags, and ignored when the their respective autoconf default variables are given. [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-03test/ruby/test_signal.rb: speedup some test by disabling RubyGemsnormal
test_signame_delivered is reduced from 1.0s to 0.1s git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63831 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-02* 2018-07-03svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-02process.c (waitpid_nogvl): start timer thread polling for lossy SIGCHLDnormal
For systems with lossy SIGCHLD, an infinitely sleeping timer thread needs to be aware of rb_waitpid callers in the first place before it can check and reset polling status. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-02Makefile.in: ARCH_FLAG may contain "-m64" etc.ngoto
* Makefile.in (mjit_config.h): ARCH_FLAG may contain "-m64", "-m32", "-march=i486" and so on, but the change made with r63232 only supports "-arch AAA -arch BBB" mainly used on Mac OS X. To solve the issue, ARCH_FLAG is parsed and the architectures specified in "-arch XXX" are added to $archs and the rest is stored to $arch_flag. The $arch_flag is defined as MJIT_ARCHFLAG if $archs is empty or the target architecture is not listed in $arch. Fix build failure on Solaris 10 with ./configure CFLAGS="-m64". [Bug #14876] [ruby-dev:50583] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-02Use PRI_PIDT_PREFIX for results of getpid()kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-02time.c: [DOC] Time#localtimenobu
* time.c: state that Time#localtime does nothing when nothing changes. [ruby-core:87675] [Bug #14880] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-02set up mjit.on at initializationnobu
* ruby.c (cmdline_options_init): set up mjit.on flag by MJIT_FORCE_ENABLE in the initialization function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-02* 2018-07-02svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-02get rid of a compiler warning of VCusa
* mjit.c (exec_prcess): use PRI_PIDT_PREFIX for pid. * win32/Makefile.sub (PRI_PIDT_PREFIX): force to "I". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-01NEWS: add NEWS entry about Kernel#then [Feature #14594]ktsj
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-01lib/.document: add csvktsj
lib/csv.rb was divided into lib/csv/*. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-01Fix a typo [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-01Remove unused variablekazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-01* 2018-07-01svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-01[DOC] newer codes recommend to use spaces onlykazu
[Bug #14246] [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-30Fix spec/ruby/command_line/rubylib_spec.rb for use with make test-speceregon
* Current code clears ENV['RUBYLIB'], but on Windows it's needed when running from build 'src' (or running make test-spec). * Patch by MSP-Greg, from https://github.com/ruby/spec/pull/607. * Imported manually to fix CI on Windows, without needing a full sync. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-30use sigsetjmp on macOSnobu
SIGCHLD is used internally since r63758, the signal masks need to be restored. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-30fix r63799 ("test/ruby/test_rubyoptions.rb: improve diagnostics for failures")normal
CI machines are faster than mine :x git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-30[DOC] Use https: instead of http:, git: [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-30[DOC] Update URL of rurema [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-30test/ruby/test_rubyoptions.rb: improve diagnostics for failuresnormal
rubyci.org OSX CI instances seem to hang on this, but I'm not sure why... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-30test/ruby/test_optimization.rb: increase timeoutnormal
For slow systems... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-30process.c: attempt to reap spawnvp (win32) result from mjitnormal
Basically in win32, mjit.c seems to work directly on spawnvp result while normal Ruby code wraps process handles to look like *nix PIDs. I'm only guessing, here... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-30mjit: provide more diagnostics for waitpid failuresnormal
Also, enable check for defined(_WIN32) macro for SIGCHLD_LOSSY, too. [Bug #14867] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-30use SIGCHLD_LOSSY to enable waitpid polling modenormal
Some systems lack SIGCHLD or have incomplete SIGCHLD implementations. So enable polling mode for them. [ruby-core:87705] [Bug #14867] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-29test_thread.rb (test_thread_interrupt_for_killed_thread): reprieve for MJITnormal
With MJIT enabled, the exit (from SIGTERM) may take a long time to complete. Prevent EnvUtil.invoke_ruby from falling back to other signals (SIGABRT) when Process.wait takes longer than the default 1s reprieve. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-29signal.c: use ATOMIC_EXCHANGE for sigchld_hitnormal
sig_atomic_t may not be sufficient for multi-threaded applications if the sighandler runs on a different CPU than timer thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e