summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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
2018-06-29* 2018-06-30svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-29test/lib/test/unit/assertions.rb (assert_in_out_err): disable gemsnormal
RubyGems loading is still a bottleneck at startup and this speeds up test/ruby/test_rubyoptions.rb test from 15s => 3.5s on the fastest machine I have access to. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-29process.c: handle errno correctly in non-SIGCHLD pathnormal
It's a bit redundant, but we optimize for platforms with SIGCHLD, not without. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-29process.c (waitpid_nogvl): check interrupts before sleepingnormal
We may be interrupted by another thread after setting ubf, but before we re-acquire interrupt_lock again to sleep on w->cond. This should fix test_wait_interrupt in test/ruby/test_process.rb git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-29improve C0 coverage of insns.defshyouhei
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-29rethrow the caught exception as-isnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-29test_process.rb (test_wait_exception): check assertion soonernormal
To diagnose f.puts => EPIPE failures in CI(*). I'm not sure what's wrong and can't reproduce EPIPE even with my slow laptop from 2005. (*) http://ci.rvm.jp/results/trunk_gcc5@silicon-docker/1058203 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-29process.c: fix typo in non-SIGCHLD waitpid :xnormal
I expect this to fix [Bug #14873] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-28* 2018-06-29svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-28rb_enc_aliasnobu
`rb_encdb`-prefixed functions are only for internal use. use rb_enc_alias instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-28ast.c: Fix defsyui-knk
* ast.c (node_children): Add mid to children git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-28Revert "rb_enc_alias"mame
This reverts commit r63779 which made test-spec fail. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-28Use nd_X shorthand for annotationnobu
[Fix GH-1901] From: hkdnet <satoko.itse@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-28rb_enc_aliasnobu
`rb_encdb`-prefixed functions are only for internal use. use rb_enc_alias instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-28fix feature name and removed a duplicate conditionnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-28check enc_capable.ko1
* encoding.c (rb_enc_capable): make it extern to check enc_capable. enc_index can be set to limited types such as T_STRING, T_REGEX and so on. This function check an object is this kind of types. * include/ruby/encoding.h: ditto. * encoding.c (enc_set_index): check a given object is enc_capable. * include/ruby/encoding.h (PUREFUNC): * marshal.c (encoding_name): check `rb_enc_capable` first. * marshal.c (r_ivar): ditto. If it is not enc_capable, it should be malformed data. * spec/ruby/optional/capi/encoding_spec.rb: remove tests depending on the wrong feature: all objects can set enc_index. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-28symbol.c: dsymbol initial encodingnobu
* symbol.c (dsymbol_alloc): set encoding directly. no need to check existing encoding in rb_enc_associate. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-28Fix typo of file path [ci skip]a_matsuda
Patch by: yuuji.yaginuma <yuuji.yaginuma@gmail.com> https://github.com/ruby/ruby/pull/1900 [Fix GH-1900] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-27tests: increase timeouts and speedup some slow testsnormal
I'm still using the computer from 2005, so enabling MJIT makes some tests take longer. For test_deadlock_by_signal_at_forking I got it down to 135s to 89s by disabling RubyGems. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-27* 2018-06-28svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-27Added guard condition for old ruby about RubyVM::MJIT.hsbt
Test libraries under the test/lib is used with default gems in their repositories. default gems may support old ruby like Ruby 2.5. When default gems invoke test libraries of Ruby core with old ruby, they raised `uninitialized constant RubyVM::MJIT (NameError)` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-27use the prefixed macronobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-27use rb_pid_t instead of pid_tnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-27Update to ruby/spec@98c7d74eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-27Update to ruby/spec@a454137eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-27Update to ruby/spec@41068a6eregon
* Only small fixes to specs from CRuby to review the diff more easily. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-27Update to ruby/mspec@7074b56eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-27remove assertion for hidden objects.ko1
* vm_insnhelper.h (PUSH): r63763 increase "PUSH()" op and it reveals that there are hidden objects (at least T_IMEMO/iseq objects) are located on VM stack. Remove this check and I'll revisit it later. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-27process.c (waitpid_wait): do not set ECHILD prematurelynormal
It is possible to have both MJIT and normal child processes alive, so we cannot set ECHILD based on such a guess. We can still elide waitpid(PID <= 0) calls if we have callers in vm->waiting_pids, however. For specs, ensure Process.waitall does not leak MJIT PIDs to Rubyspace. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-27give up insn attr handles_frameshyouhei
I introduced this mechanism in r62051 to speed things up. Later it was reported that the change causes problems. I searched for workarounds but nothing seemed appropriate. I hereby officially give it up. The idea to move ADD_PC around was a mistake. Fixes [Bug #14809] and [Bug #14834]. Signed-off-by: Urabe, Shyouhei <shyouhei@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-27signal.c: fix braino in fake_grantfdnormal
[Bug #14871] Is neon down? I missed ruby-core notifications on this. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-27s/pid_t/rb_pid_t/normal
Some platforms do not have pid_t :x git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-27Revert "spec: skip Process wait specs on MJIT"normal
This reverts r63731 (commit 359dd59db2512d801bb983f98bede4fc598f139a). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-27Revert "test_process.rb: skip tests for Bug 14867"normal
This reverts r63740 (commit 042395a7f7262464265ce70cdffbe1812aa145d3). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-27hijack SIGCHLD handler for internal usenormal
Use a global SIGCHLD handler to guard all callers of rb_waitpid. To work safely with multi-threaded programs, we introduce a VM-wide waitpid_lock to be acquired BEFORE fork/vfork spawns the process. This is to be combined with the new ruby_waitpid_locked function used by mjit.c in a non-Ruby thread. Ruby-level SIGCHLD handlers registered with Signal.trap(:CHLD) continues to work as before and there should be no regressions in any existing use cases. Splitting the wait queues for PID > 0 and groups (PID <= 0) ensures we favor PID > 0 callers. The disabling of SIGCHLD in rb_f_system is longer necessary, as we use deferred signal handling and no longer make ANY blocking waitpid syscalls in other threads which could "beat" the waitpid call made by rb_f_system. We prevent SIGCHLD from firing in normal Ruby Threads and only enable it in the timer-thread, to prevent spurious wakeups from in test/-ext-/gvl/test_last_thread.rb with MJIT enabled. I've tried to guard as much of the code for RUBY_SIGCHLD==0 using C "if" statements rather than CPP "#if" so to reduce the likelyhood of portability problems as the compiler will see more code. We also work to suppress false-positives from Process.wait(-1, Process::WNOHANG) to quiets warnings from spec/ruby/core/process/wait2_spec.rb with MJIT enabled. Lastly, we must implement rb_grantpt for ext/pty. We need a MJIT-compatible way of supporting grantpt(3) which may spawn the `pt_chown' binary and call waitpid(2) on it. [ruby-core:87605] [Ruby trunk Bug#14867] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-27Revert "bootstraptest/runner: speed up assert_finish by avoiding sleep"mame
This reverts commit r63754. Many CI servers still use old ruby as base ruby which does not support read_nonblock. https://rubyci.org/logs/www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/log/20180627T013100Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e