Граф коммитов

53058 Коммитов

Автор SHA1 Сообщение Дата
usa 34f3f916e6 Simply treat IO::WaitReadable just like Errno::EAGAIN
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20 05:18:28 +00:00
shyouhei 0deee5c0aa vm_insnhelper.c: recv -1 + 3 overflows
Here, recv can be INT2FIX(-1), which is 0xFFFF_FFFFul.
INT2FIX(1) is 3ul.  So `recv - 1 + INT2FIX(1)` is:

recv              0xFFFF_FFFFul
recv-1            0xFFFF_FFFEul (note: unsigned)
recv-1+INT2FIX(1) 0x0000_0001ul Here is the overflow.

Given recv is a Fixnum, it can never be 0xFFFF_FFFD.  0xFFFF_FFFF is
the only value that can overflow this way, so special-casing this
value should just suffice.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20 04:51:09 +00:00
shugo 0dfc5918ec revert r65822
Because mon_initialized may be used to re-initialize copied objects intentionally.

mon_initialize_spec.rb fails:

1)
MonitorMixin#mon_initialize can be called in initialize_copy to get a new Mutex and used with synchronize ERROR
ThreadError: already initialized
/home/shugo/src/ruby/lib/monitor.rb:255:in `mon_initialize'
/home/shugo/src/ruby/spec/ruby/library/monitor/mon_initialize_spec.rb:19:in `initialize_copy'
/home/shugo/src/ruby/spec/ruby/library/monitor/mon_initialize_spec.rb:28:in `initialize_dup'
/home/shugo/src/ruby/spec/ruby/library/monitor/mon_initialize_spec.rb:28:in `dup'
/home/shugo/src/ruby/spec/ruby/library/monitor/mon_initialize_spec.rb:28:in `block (2 levels) in <top (required)>'
/home/shugo/src/ruby/spec/ruby/library/monitor/mon_initialize_spec.rb:4:in `<top (required)>'

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20 03:56:51 +00:00
nobu 312fc605c1 rdoc query
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20 03:07:46 +00:00
kazu 1cf0af636c mjit.c: fix typos [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20 03:03:02 +00:00
kazu aa515c8d8c Remove unnecessary space
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20 03:03:01 +00:00
svn 9ba7aece01 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20 03:01:57 +00:00
shugo 8d68f422dc lib/monitor.rb: prevent to initialize MonitorMixin twice
Suggested by Benoit Daloze.  [ruby-core:88504] [Feature #15000]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20 03:01:55 +00:00
k0kubun 59676f6d03 revert r65820 and retry assert_finish
From: MSP-Greg <greg.mpls@gmail.com>

5187ea768f

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20 02:16:30 +00:00
k0kubun 5187ea768f test_thread.rb: skip test_thread.rb broken for Windows
msys2.

https://ci.appveyor.com/project/ruby/ruby/builds/20419607/job/fuvrfcmrhxr1r1cr
https://ci.appveyor.com/project/ruby/ruby/builds/20395349/job/2nqewb06b5eanwea
https://ci.appveyor.com/project/ruby/ruby/builds/20382452/job/658pvl1cqolyrixm

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20 01:28:43 +00:00
nobu d7d0ee1065 Check -fcf-protection
* configure.ac: Check if CFLAGS actually includes -fcf-protection
  instead of checking if the flag is valid by RUBY_TRY_CFLAGS.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20 00:39:07 +00:00
k0kubun b410d32185 thread.c: fix obsoleted comment [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20 00:07:36 +00:00
k0kubun 3405411cc4 process.c: do not try to pause MJIT
while child handler is disabled.

trying to fix [Bug #15320]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20 00:04:19 +00:00
k0kubun 95e09343a4 test_process.rb: Process.daemon seems irrelevant [ci skip]
in the backtrace:
http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1468677

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-19 23:28:30 +00:00
k0kubun 00fac76efa configure.ac: avoid crashing MJIT with -fcf-protection
by avoiding using __builtin_longjmp, like r64983.

[Bug #15307]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-19 23:05:11 +00:00
k0kubun 27322735af revert r65807
it didn't work.
http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1468677

and skips broken tests for now. But this issue should be fixed soon.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-19 22:10:12 +00:00
svn 797098f8e8 * 2018-11-20
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-19 15:00:37 +00:00
nobu de790435fa ruby/ruby.h: void rb_scan_args_verify
* include/ruby/ruby.h (rb_scan_args_verify): void the never used
  result.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-19 15:00:35 +00:00
k0kubun 9c336391f2 appveyor.yml: separately execute test_bignum
because that may crash worker with -j.
https://ci.appveyor.com/project/ruby/ruby/builds/20403179/job/mkdcb6uy8qn2djgl

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-19 14:21:55 +00:00
k0kubun b756b25c60 ruby.c: do not surface MJIT to user
In some places, both JIT and MJIT are being used, but it could be
confusing for new comers. We're not explaining MJIT on NEWS file or release
notes as well. So we consider MJIT as an internal term of implementation
like YARV.

configure.ac: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-19 14:00:49 +00:00
k0kubun 83aff333cd internal.h: resurrect --disable-mjit-support
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-19 13:48:07 +00:00
nobu 3f84ef9740 fix for Solaris sh
* Makefile.in (mjit_config.h): removed unnecessary assignment.

* tool/mjit_archflag.sh (define_arch_flags): need to quote on
  Solaris.  [ruby-dev:50669] [Bug #15319]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-19 13:43:44 +00:00
k0kubun e205cd80d2 process.c: do not run signal handler before fork
to prevent from proceeding one for MJIT while it's not safe yet.
By that situation, MJIT worker could be waiting for compiler process forever
http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1468033

[Bug #15320]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-19 13:33:07 +00:00
nobu 759cfd3bcb configure.ac: rename extra_warning as extra_warnflags
Adjusted to warnflags variable.  This variable will have flags for
warnings, but not a warning itself.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-19 13:21:48 +00:00
nobu 33fed2d09a configure.ac: respect extra_warnflags if given
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-19 10:15:20 +00:00
shyouhei 7213568733 string.c: setbyte silently ignores upper bits
The behaviour of String#setbyte has been depending on the width
of int, which is not portable.  Must check explicitly.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-19 09:52:46 +00:00
nobu d13724306e .travis.yml: do not pass unnecessary warnflags
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-19 09:42:10 +00:00
shyouhei 412b6b5b02 io.c: ungetbyte silently ignores upper bits
The behaviour of IO#ungetbyte has been depending on the width of
Fixnums.  Fixnums should be invisible nowadays.  It must be a
bug. Fix [Bug #14359]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-19 08:10:48 +00:00
nobu 38adc0c1e0 _colorize_result_prepare.m4: do not save CONFIGURE_TTY
redirection to a tty, file or pipe is not a permanent status.
`rb_cv_` prefix means that it should be saved/restored across
re-configurations.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-19 07:00:12 +00:00
nobu 74564fbe74 Makefile.in: reconfig with the original warnflags
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-19 06:52:55 +00:00
nobu 4863a93d58 .travis.yml: use dedicated flags
* .travis.yml: use dedicated flags, cflags and others, not to
  override optflags, warnflags and debugflags.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-19 06:52:54 +00:00
shyouhei 6bdca5d85e array.c: avoid (VALUE)--
This args[1]-- overflows when it is zero.  Should do that only
when we can say it is nonzero.




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-19 06:48:09 +00:00
shyouhei 1a5b274ee2 .travis.yml: -Wno-unknown-warning-option is needed, too.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-19 05:04:02 +00:00
shyouhei 9f6c0270ca .travis.yml: extra CFLAGS to suppress warnings
When CFLAGS is passed on travis, warnflags seems not working.
Let's add them directly to prevent clang form messing up the logs.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-19 03:08:32 +00:00
shyouhei e0dba0780c -Wno-unused-value [ci skip]
Without this option clang outputs tons of warnings, which
are annoying. See https://travis-ci.org/ruby/ruby/jobs/456553420#L1817


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-19 03:01:55 +00:00
shyouhei 45a89c0a0d sort lines [ci skip]
... for aethetic reasons.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-19 02:58:51 +00:00
svn becdfee6e7 * 2018-11-19
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-18 23:29:42 +00:00
nobu 9cbfb17754 Also clean ruby-runner.o and ruby.imp [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-18 23:29:41 +00:00
nobu c8ab2634c6 update-deps: fix runtime error [ci skip]
* tool/update-deps (init_global): environment strings are frozen.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-18 23:29:40 +00:00
k0kubun 524e4cc982 mjit.c: fix deadlock introduced by r65785
in mjit_pause() fired by before_fork_ruby(). When calling
RUBY_VM_CHECK_INTS() in mjit_pause()'s loop, other threads may call
start_worker() which sets `stop_worker_p = FALSE` and it could wait for
MJIT worker stop forever even while `stop_worker_p` is FALSE.

http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1466333
https://gist.github.com/ko1/a57ef1a03e1c7cfd22f1495e0864b63d

http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/1466335
https://gist.github.com/ko1/96e867e36e6b75559b3d926f8c0bdaeb

https://app.wercker.com/ruby/ruby/runs/mjit-test1/5bf1221c183106002855989c?step=5bf1225987436a0006192c31

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-18 13:32:49 +00:00
k0kubun 9edbcbcba1 wercker.yml: debug problematic test on test-all
Some test seems to hang
https://app.wercker.com/ruby/ruby/runs/mjit-test1/5bf1221c183106002855989c?step=5bf1225987436a0006192c31

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-18 09:32:29 +00:00
k0kubun fcd8412dcc test_jit.rb: loosen output check
for interleaving between processes
https://gist.github.com/ko1/ace0374825377b41628d4590b7377601

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-18 09:22:48 +00:00
k0kubun 9b850d1a9a test_jit.rb: dump information to debug test failure
debugging
http://ci.rvm.jp/results/trunk-vm-asserts@silicon-docker/1466123

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-18 08:44:16 +00:00
svn 57efe84b13 * expand tabs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-18 08:25:54 +00:00
k0kubun fe6974a8fc mjit_worker.c: support MJIT in forked Ruby process
by launching MJIT worker thread in child Ruby process.

See the comment before `mjit_child_after_fork` for details.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-18 08:25:48 +00:00
k0kubun 0a7a5a7ad4 thread.c: rb_fiber_atfork has nothing to do with mjit.c [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-18 08:23:05 +00:00
k0kubun bdf5eb3b91 mjit_worker.c: fix typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-18 08:22:46 +00:00
k0kubun 0515904414 test_jit.rb: fix typo [ci skip]
we don't have such VM register

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-18 08:22:30 +00:00
normal 644f2013d6 vm_trace.c (rb_postponed_job_flush): use rb_atomic_t for mask
ec->interrupt_mask will remain rb_atomic_t and is 32-bit on some
64-bit systems while "unsigned long" is 64-bits.  So avoid
mismatching lengths and stick to rb_atomic_t.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-18 04:34:52 +00:00
nobu 5c334727f1 common.mk: dependency of io.c for r65779
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-18 04:21:52 +00:00