aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* unrevert r63852 but keep SIGCHLD path disabled for win32normal2018-07-0516-230/+627
| | | | | | | | | | | Reading win32/win32.c waitpid implementation, maybe waitpid(-1, ...) on that platform will never conflict with mjit use of waitpid. In any case, I've added WAITPID_USE_SIGCHLD macro to vm_core.h so it can be easy for Linux/BSD users to test (hopefully!) win32-compatible code. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* signal.c: packed signalsnobu2018-07-041-8/+14
| | | | | | | | | | | | * 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-05svn2018-07-041-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert r63758 and related commitsnaruse2018-07-0416-638/+238
| | | | | | | 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
* Fallback to Digest::SHA512kazu2018-07-042-3/+7
| | | | | | | | | `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
* Skip more rubygems tests when openssl is missingkazu2018-07-044-3/+14
| | | | | | | 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
* Revert "Optimize Time.utc"naruse2018-07-041-3/+0
| | | | | | | This reverts commit r63848. It breaks tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63849 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Optimize Time.utcnaruse2018-07-041-0/+3
| | | | | | | | | | | | | | | | | | 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
* internal.h (rb_warning_string): use PRINTF_ARGSnormal2018-07-041-1/+1
| | | | | | 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
* thread_pthread.c: pass rb_vm_t to timer_thread_sleepnormal2018-07-041-9/+7
| | | | | | | | | | 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
* vm.c: simplified core#hash_merge_kwdnobu2018-07-032-23/+9
| | | | | | | | | | | * 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
* mjit.h: avoid signed pointer comparisons (fix for 32-bit)normal2018-07-031-1/+1
| | | | | | | 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-04svn2018-07-031-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix compile errorkazu2018-07-031-1/+1
| | | | | | | | 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
* signal.c: packed signalsnobu2018-07-031-8/+14
| | | | | | | | | * 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
* adjust indent [ci skip]nobu2018-07-031-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* skip test_localtime_zone if force_tz_test is falsenaruse2018-07-031-0/+1
| | | | | | | 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
* [DOC] Use https: instead of git: [ci skip]kazu2018-07-031-1/+1
| | | | | | ref r63801, r61199 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63838 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm.c (rb_source_location): check for NULL cfp->iseqnormal2018-07-031-1/+1
| | | | | | | | 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
* thread_pthread.c (native_thread_destroy): clear native TSD pointernormal2018-07-031-4/+11
| | | | | | | | | | | | | | 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
* cont.c: handle errors for getcontext()nobu2018-07-031-3/+12
| | | | | | | | | | | | | | | 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
* fake.rb.in: duplicated RUBYOPTnobu2018-07-031-1/+6
| | | | | | * 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
* rubyopt_spec.rb: skip -v in RUBYOPT examplesnobu2018-07-031-8/+10
| | | | | | | | | * 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
* configure.ac: [DOC] refine help messagesnobu2018-07-031-3/+3
| | | | | | | | | 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
* test/ruby/test_signal.rb: speedup some test by disabling RubyGemsnormal2018-07-031-13/+14
| | | | | | 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-03svn2018-07-021-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c (waitpid_nogvl): start timer thread polling for lossy SIGCHLDnormal2018-07-021-0/+3
| | | | | | | | 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
* Makefile.in: ARCH_FLAG may contain "-m64" etc.ngoto2018-07-021-4/+25
| | | | | | | | | | | | | | | * 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
* Use PRI_PIDT_PREFIX for results of getpid()kazu2018-07-021-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* time.c: [DOC] Time#localtimenobu2018-07-023-0/+27
| | | | | | | * 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
* set up mjit.on at initializationnobu2018-07-021-4/+3
| | | | | | | * 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-02svn2018-07-021-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* get rid of a compiler warning of VCusa2018-07-022-2/+2
| | | | | | | | | * 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
* NEWS: add NEWS entry about Kernel#then [Feature #14594]ktsj2018-07-011-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/.document: add csvktsj2018-07-011-0/+1
| | | | | | 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
* Fix a typo [ci skip]kazu2018-07-011-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove unused variablekazu2018-07-011-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2018-07-01svn2018-07-011-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* [DOC] newer codes recommend to use spaces onlykazu2018-07-011-1/+2
| | | | | | | [Bug #14246] [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix spec/ruby/command_line/rubylib_spec.rb for use with make test-speceregon2018-06-301-6/+7
| | | | | | | | | * 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
* use sigsetjmp on macOSnobu2018-06-301-0/+1
| | | | | | | 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
* fix r63799 ("test/ruby/test_rubyoptions.rb: improve diagnostics for failures")normal2018-06-301-2/+4
| | | | | | CI machines are faster than mine :x git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* [DOC] Use https: instead of http:, git: [ci skip]kazu2018-06-301-6/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* [DOC] Update URL of rurema [ci skip]kazu2018-06-301-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_rubyoptions.rb: improve diagnostics for failuresnormal2018-06-301-4/+11
| | | | | | | 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
* test/ruby/test_optimization.rb: increase timeoutnormal2018-06-301-1/+1
| | | | | | For slow systems... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* process.c: attempt to reap spawnvp (win32) result from mjitnormal2018-06-301-2/+14
| | | | | | | | 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
* mjit: provide more diagnostics for waitpid failuresnormal2018-06-302-3/+4
| | | | | | | | 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
* use SIGCHLD_LOSSY to enable waitpid polling modenormal2018-06-305-3/+20
| | | | | | | | | 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
* test_thread.rb (test_thread_interrupt_for_killed_thread): reprieve for MJITnormal2018-06-291-1/+6
| | | | | | | | | 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