summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-07-08common.mk: drop obsoleted `make tbench`k0kubun
benchmark/bmx_* files haven't existed since r37263 and thus it runs nothing. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-08test/ruby/test_signal.rb: skip ensure if test is skippednormal
Thanks to Greg for the fix. [ruby-core:87860] [Bug #14867] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-08signal.c: preserve trap(:CHLD, "IGNORE") behavior with SIGCHLDnormal
We need to preserve "IGNORE" behavior from Ruby 2.5 and earlier. We can't rely on SA_NOCLDWAIT any more, since we always need system() and MJIT to work; so we fake that behavior using dedicated reaper (currently in timer-thread). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63879 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-07* 2018-07-08svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-07process.c (rb_f_exec): pause MJIT before replacing processnormal
Non-parallel "make test-spec" caused spec/ruby/core/process/wait2_spec.rb failures because mspec uses "exec" in single-process mode, so there's no chance the post-exec state could know about the MJIT child process from its pre-exec state. [ruby-core:87846] [Bug #14867] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-07wait2_spec.rb: skip leak checker for nowk0kubun
This is not working with cppflags="-DMJIT_FORCE_ENABLE" on my machine. ``` $ make test-spec $ /home/k0kubun/src/github.com/ruby/ruby-svn/.ruby-force/miniruby -I/home/k0kubun/src/github.com/ruby/ruby-svn/lib /home/k0kubun/src/github.com/ruby/ruby-svn/tool/runruby.rb --archdir=/home/k0kubun/src/github.com/ruby/ruby-svn/.ruby-force --extout=.ext -- /home/k0kubun/src/github.com/ruby/ruby-svn/spec/mspec/bin/mspec-run -B ../spec/default.mspec ruby 2.6.0dev (2018-07-07 trunk 63874) +JIT [x86_64-linux] [| | ================ 40% | 00:02:03] 0F 0E leaked before wait2 specs: [[31406, #<Process::Status: pid 31406 exit 0>]] 1) An exception occurred during: before :all FAILED Expected [[31406, #<Process::Status: pid 31406 exit 0>]] to be empty /home/k0kubun/src/github.com/ruby/ruby-svn/spec/ruby/core/process/wait2_spec.rb:18:in `block (3 levels) in <top (required)>' /home/k0kubun/src/github.com/ruby/ruby-svn/spec/ruby/core/process/wait2_spec.rb:16:in `block (2 levels) in <top (required)>' /home/k0kubun/src/github.com/ruby/ruby-svn/spec/ruby/core/process/wait2_spec.rb:3:in `<top (required)>' [- | ==================100%================== | 00:00:00] 1F 0E Finished in 103.288794 seconds 3607 files, 28545 examples, 208272 expectations, 1 failure, 0 errors, 0 tagged uncommon.mk:777: recipe for target 'yes-test-spec' failed make: *** [yes-test-spec] Error 1 ``` Let me skip this for now and enable MJIT CI again. Related to Bug#14867 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-07insns.def: stop pushing unnecessary keys for MJITk0kubun
[Bug #14892] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-07_mjit_compile_insn_body: rollback pc correctlyk0kubun
for catch_except_p case Partially solving Bug#14892 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-07* 2018-07-07svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-07test/socket/test_socket.rb (test_timestamp): retry sendnormal
I theorize there can be UDP packet loss even over loopback if the kernel is under memory pressure. Retry sending periodically until recvmsg succeeds. i[ruby-core:87842] [Bug #14898] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-06const_missing on private constantsnobu
* variable.c (rb_const_search): call #const_missing method on private constants, as well as uninitialized constants. [Feature #14328] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-06compile.c: remove unreachable jump onlynobu
* compile.c (iseq_peephole_optimize): remove unreachable jump instruction only. if it is labeled and referred from other instructions, it is reachable and must not be removed. [ruby-core:87830] [Bug #14897] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-06mjit.c: fix waitpid macro return value for win32normal
We started checking return value of waitpid, so it needs to be correct for win32 platforms for MJIT to work. Thanks-to: MSP-Greg (Greg L) <Greg.mpls@gmail.com> [ruby-core:87832] [Bug #14867] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-06Fix a bug of peephole optimizationmame
``` if L1 L0: jump L2 L1: ... L2: ``` was wrongly optimized to: ``` unless L2 L0: L1: ... L2: ``` To make it conservative, this optimization is now disabled when there is any label between `if` and `jump` instructions. Fixes [Bug #14897]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-06thread.c (ruby_ppoll): improve timespec to msec conversionnormal
Round up non-zero <1ms timeouts to 1ms and use INT_MAX instead of infinite (-1) for extremely large timeouts. All of our ppoll/select callers are able to handle spurious wakeups, anyways. This avoids excessive CPU usage and busy waits with short timeouts to rb_wait_for_single_fd. CPU usage with the following script is significantly reduced for systems with "#undef HAVE_PPOLL": require 'io/wait' r, w = IO.pipe Thread.new { loop { r.wait_readable(0.000001) } }.join(5) exit!(0) Low-resolution in poll(2) still sucks, though... Note: I don't see the value in making a similar change to time_timeval of a <1us sleep is attempted because of GVL release and syscall latency. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-06thread.c: our fake ppoll implementation is staticnormal
Rename it to "ruby_ppoll" so it looks more obvious in debuggers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-06Fixup r63864kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-06Prefixed reset_leap_second_infonobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-05revert r62655 for r63763k0kubun
r63655 was tightly coupled to handle_frames and some assumptions seems to have been broken by r63763. To partially resolve Bug#14892, this reverts the optimization for now. I want to make MJIT CI happy first and then I'll probably retry r63655 by partially reverting r63763 for sp changes. The skipped test is not fixed yet. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-05* 2018-07-06svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-05Make a prototypenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-05ruby tool/update-deps --fixnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-05Add missing prototypenaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-05Add missing filenaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-05Re-apply r63848 (Optimize Time.utc)naruse
* Both timegmw and gmtimew ignores leap second if the timezone doesn't have leap seconds on the first call of init_leap_second_info() * Add Bug::Time.reset_leap_second_info for testing git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-05Revert "get rid of a compiler warning of VC"normal
Partially revert r63820. mjit.c seems to have different idea of "pid" type/size than the rest of Ruby on win32. As noted in [ruby-core:87794], this seems to break Greg's build. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-05unrevert r63852 but keep SIGCHLD path disabled for win32normal
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
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