aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* thread_pthread.c: hoist out do_gvl_timer and improve documentationnormal2018-08-151-29/+58
| | | | | | | | This hopefully clarifies the roles of UBF_TIMER and vm->gvl.timer [ruby-core:88475] [Misc #14937] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_core.h (rb_thread_t): pack small fields togethernormal2018-08-152-9/+9
| | | | | | | | | On a 64-bit system, this reduces rb_thread_t from 536 to 520 bytes. Depending on the allocation, this can reduce cacheline access for checking the abort_on_exception, report_on_exception and pending_interrupt_queue_checked flags. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread_pthread.h (native_thread_data): split list_node between ubf and gvlnormal2018-08-152-10/+14
| | | | | | | | | Do not waste extra memory for each thread, but make thread_pthread.c easier-to-follow as a result. [ruby-core:88475] [Misc #14937] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_function.rb: skip running testk0kubun2018-08-151-0/+4
| | | | | | | | | | | | | | that times out with test-all w/ --jit-wait. I'm running the following command on Wecker CI everyday: ``` make test-all TESTOPTS="--color=never --job-status=normal" RUN_OPTS="--disable-gems --jit-wait --jit-warnings" RUBY_FORCE_TEST_JIT=1 ``` By running yesterday's all commits, r64354 ran successfully but r64355 didn't. So the test should be fixed to run with --jit-wait at first. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread_pthread.c: rename rb_timer_* to ubf_timer_*normal2018-08-151-22/+25
| | | | | | | | | | These functions will not be exported outside of thread_pthread.c and we need to clarify the timer here is used for ubf and not timeslice. [ruby-core:88475] [Misc #14937] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread_pthread.c: rename timer_thread_pipe to signal_self_pipenormal2018-08-151-15/+15
| | | | | | | | This data structure has nothing to do with timers or threads. [ruby-core:88475] [Misc #14937] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread_pthread.c: additional UBF_TIMER == UBF_TIMER_PTHREAD guardsnormal2018-08-151-2/+3
| | | | | | | | Hopefully this makes the code easier-to-follow [ruby-core:88475] [Misc #14937] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* appveyor.yml: no MSYS path conversionnobu2018-08-151-1/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_readline.rb: skip teardown failurek0kubun2018-08-151-0/+3
| | | | | | | | https://ci.appveyor.com/project/ruby/ruby/build/9271/job/e88212s136mr0dgr I'll take a look at MSP-Greg's patch on readline later. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* appveyor.yml: get rid of msys sh as possiblenobu2018-08-151-20/+25
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* -Wsuggest-attribute=noreturn on io_spec_rb_io_wait_readablenobu2018-08-151-0/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64367 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_env.rb: change mingw branchk0kubun2018-08-151-4/+1
| | | | | | | | https://github.com/MSP-Greg/ruby-loco/blob/e287cb739113da289271a017a1e7fa46cbfe47d9/patches/gte20600/test-ruby-test_env.rb_test_huge_value.patch From: MSP-Greg (Greg L) <Greg.mpls@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64366 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* skip tests failing on AppVeyor MinGWk0kubun2018-08-152-0/+6
| | | | | | Let me skip this to make CI green first and take a look later... git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* appveyor.yml: remove broken --name optionk0kubun2018-08-141-1/+2
| | | | | | | Currently all tests are skipped by the --name option. V=1 is for debugging this issue. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* webrick/httpauth/htgroup.rb (flush): avoid unnecessary unlinknormal2018-08-141-4/+7
| | | | | | | | | | Based on patch by akr [ruby-core:88477], use Tempfile.create to avoid unnecessary unlink call. Unlike akr's original patch, this does not change the return value of flush. Thanks-to: Tanaka Akira <akr@fsij.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert "test/lib/leakchecker.rb (find_tempfiles): don't warn for missing files"normal2018-08-141-2/+1
| | | | | | | | | This reverts commit 52102f6ff50eebf8c16667c9b49cef579d2057c1 (r64238). It is no longer necessary if we use Tempfile.create in WEBrick::HTTPAuth::Htgroup#flush (see next commit) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert "thread_pthread.c: use UBF_TIMER_PTHREAD on Solaris"normal2018-08-141-6/+1
| | | | | | | | | This reverts commit 31bfe0fe86433beddfec2b2bdba69dfda1775f8d (r64357) commit 17ed23bb6dfc942a8c51658b01135c3e2807ccf0 (r64359, "fix fragile spec from unpredictable errno") is the correct fix git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2018-08-15svn2018-08-141-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64360 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* spec/ruby/optional/capi/io_spec.rb: fix fragile spec from unpredictable errnonormal2018-08-142-0/+16
| | | | | | | | | | | | | | | rb_io_wait_readable and rb_io_wait_writable depend on the TSD errno value. Due to the recent changes in r64352-r64353 to restructure GVL, errno could be set to EAGAIN from the signal self-pipe and cause the rb_io_wait_readable spec to block unexpectedly. This should fix rubyspec timeouts on Solaris: http://rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20180814T042506Z.fail.html.gz * spec/ruby/optional/capi/ext/io_spec.c: add errno= setter method * spec/ruby/optional/capi/io_spec.rb: set errno to appropriate values for tests git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64359 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* non-symbol keys in kwargsnobu2018-08-145-52/+140
| | | | | | | | * class.c (separate_symbol): [EXPERIMENTAL] non-symbol key in keyword arguments hash causes an exception now. c.f. https://twitter.com/yukihiro_matz/status/1022287578995646464 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64358 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread_pthread.c: use UBF_TIMER_PTHREAD on Solarisnormal2018-08-141-1/+6
| | | | | | | | | | | I'm not sure what's causing this failure in Solaris and only on rubyspec, since rb_io_wait_readable is a well-exercised code path in other places. But maybe using a pthread for timing (similar to old timer-thread) can solve the issue. cf. http://rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20180814T042506Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread_pthread.c: use CLOCK_REALTIME on SunOS (Solaris)normal2018-08-141-1/+7
| | | | | | | | | | | | | timer_create does not seem to support CLOCK_MONOTONIC on Solaris, and CLOCK_HIRES seems like it could fail with insufficient permissions: https://docs.oracle.com/cd/E86824_01/html/E54766/timer-create-3c.html (Only tested on Linux and FreeBSD) [ruby-core:88360] [Misc #14937] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/fiddle/test_function.rb (test_nogvl_poll): stop timer hacknormal2018-08-141-0/+6
| | | | | | | | | | | | | | EINTR seems unavoidable in real programs (or MJIT), so maybe it's not worth dealing with. r64353 relies on POSIX timers to signal. Switching pipes and sockets to non-blocking by default would let us get rid of POSIX timers, timer pthread and this hack: https://bugs.ruby-lang.org/issues/14968 [ruby-core:88360] [Misc #14937] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread_pthread (rb_timer_arm): ignore UBF_TIMER_POSIX state 2normal2018-08-131-1/+7
| | | | | | | | | It looks like I forgot to account for a situation involving 3 threads. [ruby-core:88360] [Misc #14937] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread_pthread: use POSIX timer or thread to get rid of racesnormal2018-08-132-44/+290
| | | | | | | | | | | | | | | | | | | | | | This closes race condition where GVL is uncontended and a thread receives a signal immediately before calling the blocking function when releasing GVL: 1) check interrupts 2) release GVL 3) blocking function If signal fires after 1) but before 3), that thread may never wake up if GVL is uncontended We also need to wakeup the ubf_list unconditionally on gvl_yield; because two threads can be yielding to each other while waiting on IO#close while waiting on threads in IO#read or IO#gets. [ruby-core:88360] [Misc #14937] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread_pthread.c: eliminate timer thread by restructuring GVLnormal2018-08-1311-584/+746
| | | | | | | | | | | This reverts commit 194a6a2c68e9c8a3536b24db18ceac87535a6051 (r64203). Race conditions which caused the original reversion will be fixed in the subsequent commit. [ruby-core:88360] [Misc #14937] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* FreeBSD 11.0 lacks ELFCOMPRESS_ZLIBnaruse2018-08-131-1/+2
| | | | | | | | | | | | FreeBSD 11.0 unfortunately lacks ELF compression definitions in their elf.h (sys/elf_common.h), and 11.1 introduced them. https://github.com/freebsd/freebsd/commit/b9167d33a12b8a6c279be9cd1005874728e808c9 Though we can add workaround, we simply drop support because FreeBSD 11.0 is already EOL at November 30, 2017. https://www.freebsd.org/security/unsupported.html git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* appveyor.yml: install gdbmk0kubun2018-08-131-1/+1
| | | | | | | | which is missing on AppVeyor environment https://github.com/ruby/ruby/commit/6a1e323ae88101cfed3fc4591d6e6a3bd8c05f02#commitcomment-30056791 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64350 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2018-08-14svn2018-08-131-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* appveyor.yml: add MinGW buildk0kubun2018-08-131-0/+41
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64348 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typos [ci skip]kazu2018-08-131-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* mention about r64337usa2018-08-131-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add some tests for *method_defined?usa2018-08-131-0/+14
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix test bugkazu2018-08-132-1/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64344 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix problem about notimplemented caseusa2018-08-132-87/+153
| | | | | | | Re-revert r64340, and take care about notimplemented case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64343 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* appveyor.yml: drop unnecessary 1.0. prefixk0kubun2018-08-131-77/+81
| | | | | | | | | | from version. Also I fixed the wrong way of using `for:`. Specifying `for` without `matrix.only` was just useless. This fix is for adding MinGW matrix in the future. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add test for method_defined?(notimplement)kazu2018-08-131-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert "Support optional inherit argument for Module#method_defined?"kazu2018-08-132-152/+87
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* get rid of an encode noncompatible errorusa2018-08-131-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.svn2018-08-131-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64338 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Support optional inherit argument for Module#method_defined?usa2018-08-132-87/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Module has many introspection methods for methods and constants that either return an array or return true or false for whether the method or constant is defined. Most of these methods support an optional argument that controls whether to consider inheritance. Currently, the following Module methods support such a argument: * const_defined? * constants * instance_methods * private_instance_methods * protected_instance_methods * public_instance_methods and the following methods do not: * method_defined? * private_method_defined? * protected_method_defined? * public_method_defined? This patch supports such an argument for the *method_defined? methods. While you can currently work around the lack of support via: mod.instance_methods(false).include?(:method_name) This patch allows the simpler and more efficient: mod.method_defined?(:method_name, false) One case where you want to exclude inheritance when checking for a method definition is when you want to replace a method that may already exist. To avoid a verbose warning, you want to remove the method only if it is already defined: remove_method(:foo) if method_defined?(:foo, false) define_method(:foo){} You can't call remove_method without checking for the method definition, as that can raise a NameError, and you don't want to include inheritance because remove_method will still raise a NameError if the method is defined by an ancestor and not by the module itself. [ruby-core:88140] [Feature #14944] From: Jeremy Evans <code@jeremyevans.net> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/rinda/test_rinda.rb: Start keeper only on used testskazu2018-08-131-0/+32
| | | | | | to reduce sleeping threads on unrelated tests git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Makefile.in: drop MJIT_DLDFLAGS_NOCOMPRESSk0kubun2018-08-133-7/+0
| | | | | | which is obsoleted by r64331 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64335 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Don't free allocated uncompressed_debug_line until backtrace is printednaruse2018-08-131-8/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Re-apply wrongly reverted r64330naruse2018-08-131-6/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64333 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Define parse_compressed_debug_line() only ifdef SUPPORT_COMPRESSED_DEBUG_LINEnaruse2018-08-131-1/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* support compressed debug_linenaruse2018-08-132-10/+66
| | | | | | | | re-commit r64328 https://blogs.oracle.com/solaris/elf_section_compression-v2 https://gnu.wildebeest.org/blog/mjw/2016/01/13/elf-libelf-compressed-sections-and-elfutils/ git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.ac: use linker_flag to LIBRUBY_DLDFLAGSnobu2018-08-131-6/+2
| | | | | | | | | | * configure.ac: use a feature flag `linker_flag`, than checking if the compiler is `GCC`. * configure.ac: append to LIBRUBY_DLDFLAGS once after initialized with DLDFLAGS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64330 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert "support compressed debug_line"naruse2018-08-132-55/+7
| | | | | | This reverts commit r64328 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* support compressed debug_linenaruse2018-08-132-7/+55
| | | | | | | https://blogs.oracle.com/solaris/elf_section_compression-v2 https://gnu.wildebeest.org/blog/mjw/2016/01/13/elf-libelf-compressed-sections-and-elfutils/ git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64328 b2dd03c8-39d4-4d8f-98ff-823fe69b080e