summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-06-25comma at the end of enum is a C99ismshyouhei
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-25mjit.c: avoid signed pointer comparisons (fix for 32-bit)normal
ptrdiff_t is a signed type, use uintptr_t instead for unsigned comparisons. This is needed to allow MJIT tests to pass on 32-bit x86 GNU/Linux. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-25mjit.c: set PIC flags on clang for FreeBSD and glibcnormal
This seems required on FreeBSD 11.1 (clang 4.0.0) and Debian stretch (clang 3.8.1) for shared libraries. Note: Not checking __linux__ because there are statically-linked Linux distros (I don't know if they can support MJIT). But glibc doesn't support static linking, so we guard on that. Maybe other platforms will need this, too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-25mjit.c: avoid execvp PATH lookup in vfork-ed childnormal
execvp(3) is not async-signal-safe and may alter libc internal states (e.g. those used by malloc). However execv(3) is async-signal-safe as of POSIX.1-2008. So perform the PATH lookup in the parent and use execv(3) in the child. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-24* 2018-06-25svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-24UNIXSocket#recv_io: trigger GC when out of FDsnormal
Make this behavior is consistent with our other FD-allocating methods. EMFILE and ENFILE are not documented nor can I trigger them when using UNIXSocket#recv_io. However, ENOMEM is documented, and I've triggered EMSGSIZE on FreeBSD and truncated messages when an EMFILE condition is hit on my system. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-24process.c (ruby_fork_ruby): fix race in signal handlingnormal
We must block signals before stopping timer-thread, otherwise signal handing may be delayed until (and if) another signal is received after timer-thread is restarted. [ruby-core:87622] [Bug #14868] [Bug #13916] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-24test_process.rb: skip tests for Bug 14867k0kubun
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-24process.c (after_fork_ruby): make it a proper functionnormal
Improves readability to me, and there's no point in using macros for this with decent compilers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-24test/net/http/test_httpresponse.rb: add testcases for net/httpresponsemame
This change adds testcases for Response#inspect and #code_type, and improves line coverage of lib/net/http/response.rb (91.8 % to 92.94 %). A patch from @owlworks. https://github.com/ruby/ruby/pull/1898 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-24lib/prime.rb: remove unused methodsmame
This change removes TrialDivision#cache, TrialDivision#primes, and TrialDivision#primes_so_far. TrialDivision class is undocumented officially, so this class is used only internally. Yugui san moved prime library from mathn to prime in 2008, and then she might forget to delete these methods. A patch from @shio-phys. https://github.com/ruby/prime/pull/4 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-24* 2018-06-24svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-24test/test_prime.rb: add testcases of prime librarymame
This change improves line coverage of prime.rb from 86% to 99%. A patch from @shio-phys. https://github.com/ruby/prime/pull/3 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-23mjit.c: disable calling JIT-ed codek0kubun
when TracePoint is enabled. We're cancelling JIT-ed code execution AFTER each instruction, but there is no guard before the first insn of method. To prevent spoiling performance, I don't want to modify the JIT-ed code to fix this. So this commit replaces `mjit_enabled` check with `mjit_call_p` check. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-23gc.c (ruby_mimmalloc): add initialize code for USE_GC_MALLOC_OBJ_INFO_DETAILStarui
We often had SEGV in ruby_xfree when USE_GC_MALLOC_OBJ_INFO_DETAILS is 1 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-23mjit.c: unify the variable name with method namek0kubun
`RubyVM::MJIT.enabled?`. It's set to be TRUE even before initialization is finished. So it was actually not "mjit initialized predicate". This flag is also used to check whether JIT-ed code should be called or not, but I'm going to split the responsibility to another flag. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-23spec: skip Process wait specs on MJITk0kubun
until [Bug #14867] is fixed. I want to start running CI with MJIT enabled before fixing the problem. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-23mjit.c: initial cygwin supportk0kubun
thread_pthread.c: Drop pthread_attr_setscope usage. It seems that, at least on Linux and macOS, PTHREAD_SCOPE_PROCESS is not supported and thus PTHREAD_SCOPE_SYSTEM should be used by default. Let's just stop calling this until we find some platform that needs `pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)`. [Misc #14854] From: fd0 (Daisuke Fujimura) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63730 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-23[DOC] Add call signature for {Array,Hash}#any?ktsj
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-23test/ruby/test_settracefunc.rb: fix NoMethodErrorktsj
* test/ruby/test_settracefunc.rb (test_trace_point_raising_exception_in_bmethod_call): this test run in separate process, so #target_thread? is not defined and it doesn't need target thread check. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-23vm.c: fix infinite loopktsj
* vm.c: use EXEC_EVENT_HOOK_AND_POP_FRAME. While exception handling, if an exception is raised in hooks, need to pop current frame and raise this raised exception by hook. [ruby-dev:50582] [Bug #14865] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-23vm.c: fix typo in function namektsj
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-23* 2018-06-23svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-23thread_pthread.c (native_sleep): do not clear unblock.argnormal
It is unnecessary to clear unblock.arg once unblock.func is cleared, and unblock_function_clear in thread.c doesn't touch it, either. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-22remove debug printnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-22check net.core.wmem_default and max instead of tcpnaruse
https://travis-ci.org/ruby/ruby/jobs/395416137 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63722 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-22show net.ipv4.tcp_wmem to debug failure on travisnaruse
https://travis-ci.org/ruby/ruby/builds/395318841 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63721 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-22dir.c: define O_CLOEXEC for older systemsnormal
SuSE 10 has openat(), but not O_CLOEXEC Reported-by: wangpeiwen [ruby-core:87591] [Bug #14864] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-22thread.c (sleep_timespec): avoid needless update w/o spuriuos checknormal
No point in wasting cycles updating the timespec when not checking on spurious wakeups. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-22remove DISABLE_RUBYGEMS from config filesnobu
* configure.ac: removed DISABLE_RUBYGEMS macro from config.h, not to rebuild everything when the flag changed. * configure.ac, win32/configure.bat: make USE_RUBYGEMS lowercase. * tool/mkconfig.rb: remove RUBYGEMS stuff from rbconfig.rb, not to reconfigure and rebuild all extension libraries. * Makefile.in (CPPFLAGS): enable/disable Rubygems by USE_RUBYGEMS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-22test/ruby/test_range.rb: add a test for endless range's min with comparisonmame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-22range.c: Range#last and #max raises a RangeError if it is endlessmame
Also, Range#min raises an error if it is endless and a comparison method is specified. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-22range.c: Range#size now returns Float::INFINITY if it is endlessmame
Fixes [Bug #14699] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-22range.c: Range#to_a now raises RangeError if it is endlessmame
Fixes [Bug #14845] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-22vm_core.h (rb_vm_t): make sleeper non-volatilenormal
vm->sleeper is never modified in signal handlers or without GVL, so there's no need for volatile hocus-pocus. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-22* 2018-06-22svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63712 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-22thread_sync.c (rb_mutex_lock): fix deadlocknormal
* thread_sync.c (rb_mutex_lock): fix deadlock [ruby-core:87467] [Bug #14841] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63711 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-21mjit.c: RubyVM::MJIT.pause / RubyVM::MJIT.resumek0kubun
[Feature #14830] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-20thread_pthread.c: fix non-sleepy timer-thread with forknormal
This fixes bootstraptest/test_fork.rb for systems with sleepy timer thread disabled. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-20test/ruby/test_io.rb: fix timing sensitive testnormal
For systems with sleepy timer thread disabled, the signal handler does not fire soon enough and we need to ensure the signal is received before we check its value. So use a self-pipe here. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-20* 2018-06-21svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-20add assertion to vm_search_method()ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-20ConditionVariable and Queue is not standard library.hsbt
They are located under the Thread class. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-20test_ast.rb: Remove a needless lineyui-knk
`RubyVM::AST.parse_file` was fixed to raise `SyntaxError` by r63602. So this line is needless. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-20test_ast.rb: Fix an argument of `grep`, child is a `RubyVM::AST::Node`yui-knk
Yusuke Endoh pointed out coverage of ast module is very low. Thanks! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-20skip when group name is not foundnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-20Introduce `USE_GC_MALLOC_OBJ_INFO_DETAILS`. [Feature #14857]ko1
* include/ruby/defines.h: introduce `USE_GC_MALLOC_OBJ_INFO_DETAILS` to show malloc statistics by replace ruby_xmalloc() and so on with macros. * gc.c (struct malloc_obj_info): introduced to save per-malloc information. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-20Thread is always provided at current ruby version.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-19* 2018-06-20svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-06-19lib/drb/extservm.rb (service): do not return `false'normal
invoke_service_command may set entries in @servers to `false', making it incompatible with the intended use of the safe navigation operator. This caused occasional DRb test failures, but they were hidden with automatic retry. [ruby-core:87524] [Bug #14856] Fixes: r53111 ("use safe navigation operator") commit 059c9c1cf371e049c7481c78b76e9620da52757f [GH-1142] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e