summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-08-07win32/Makefile.sub: remove RUBY_EXPORT macrok0kubun
defined in XCFLAGS. This change resolves following link errors in MJIT: ``` rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_cObject rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_cFalseClass rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_cFloat rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_cInteger rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_cNilClass rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_cProc rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_cString rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_cSymbol rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_cTrueClass rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_eArgError rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_eNoMethodError rb_mjit_header-2.6.0.obj : error LNK2001: unresolved external symbol rb_eNameError _ruby_mjit_p41476u0.obj : error LNK2001: unresolved external symbol rb_eFatal ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-06* properties.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-06enumerator.c: Introduce Enumerator::ArithmeticSequencemrkn
This commit introduces new core class Enumerator::ArithmeticSequence. Enumerator::ArithmeticSequence is a subclass of Enumerator, and represents a number generator of an arithmetic sequence. After this commit, Numeric#step and Range#step without blocks returned an ArithmeticSequence object instead of an Enumerator. This class introduces the following incompatibilities: - You can create a zero-step ArithmeticSequence, and its size is not ArgumentError, but Infinity. - You can create a negative-step ArithmeticSequence from a range. [ruby-core:82816] [Feature #13904] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-06test/ripper/test_parser_events.rb (test_block_variables): increase RLIMIT_ASnormal
Unfortunately, MJIT goes over the 100M RLIMIT_AS for this test on x86-64 (Debian 9) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64204 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-06thread_pthread.c: restore timer-thread for now :<normal
[ruby-core:88306] Revert "process.c: ensure th->interrupt lock is held when migrating" This reverts commit 5ca416bdf6b6785cb20f139c2c514eda005fe42f (r64201) Revert "process.c (rb_waitpid): reduce sigwait_fd bouncing" This reverts commit 217bdd776fbeea3bfd0b9324eefbfcec3b1ccb3e (r64200). Revert "test/ruby/test_thread.rb (test_thread_timer_and_interrupt): add timeouts" This reverts commit 9f395f11202fc3c7edbd76f5aa6ce1f8a1e752a9 (r64199). Revert "thread_pthread.c (native_sleep): reduce ppoll sleeps" This reverts commit b3aa256c4d43d3d7e9975ec18eb127f45f623c9b (r64193). Revert "thread.c (consume_communication_pipe): do not retry after short read" This reverts commit 291a82f748de56e65fac10edefc51ec7a54a82d4 (r64185). Revert "test/ruby/test_io.rb (test_race_gets_and_close): timeout each thread" This reverts commit 3dbd8d1f66537f968f0461ed8547460b3b1241b3 (r64184). Revert "thread_pthread.c (gvl_acquire_common): persist timeout across calls" This reverts commit 8c2ae6e3ed072b06fc3cbc34fa8a14b2acbb49d5 (r64165). Revert "test/ruby/test_io.rb (test_race_gets_and_close): use SIGABRT on timeout" This reverts commit 931cda4db8afd6b544a8d85a6815765a9c417213 (r64135). Revert "thread_pthread.c (gvl_yield): do ubf wakeups when uncontended" This reverts commit 508f00314f46c08b6e9b0141c01355d24954260c (r64133). Revert "thread_pthread.h (native_thread_data): split condvars on some platforms" This reverts commit a038bf238bd9a24bf1e1622f618a27db261fc91b (r64124). Revert "process.c (waitpid_nogvl): prevent conflicting use of sleep_cond" This reverts commit 7018acc946882f21d519af7c42ccf84b22a46b27 (r64117). Revert "thread_pthread.c (rb_sigwait_sleep): th may be 0 from MJIT" This reverts commit 56491afc7916fb24f5c4dc2c632fb93fa7063992 (r64116). Revert "thread*.c: waiting on sigwait_fd performs periodic ubf wakeups" This reverts commit ab47a57a46e70634d049e4da20a5441c7a14cdec (r64115). Revert "thread_pthread.c (gvl_destroy): make no-op on GVL bits" This reverts commit 95cae748171f4754b97f4ba54da2ae62a8d484fd (r64114). Revert "thread_pthread.c (rb_sigwait_sleep): fix uninitialized poll set in UBF case" This reverts commit 4514362948fdb914c6138b12d961d92e9c0fee6c (r64113). Revert "thread_pthread.c (rb_sigwait_sleep): re-fix [Bug #5343] harder" This reverts commit 26b8a70bb309c7a367b9134045508b5b5a580a77 (r64111). Revert "thread.c: move ppoll wrapper into thread_pthread.c" This reverts commit 3dc7727d22fecbc355597edda25d2a245bf55ba1 (r64110). Revert "thread.c: move ppoll wrapper before thread_pthread.c" This reverts commit 2fa1e2e3c3c5c4b3ce84730dee4bcbe9d81b8e35 (r64109). Revert "thread_pthread.c (ubf_select): refix [Bug #5343]" This reverts commit 4c1ab82f0623eca91a95d2a44053be22bbce48ad (r64108). Revert "thread_win32.c: suppress warnings by -Wsuggest-attribute" This reverts commit 6a9b63e39075c53870933fbac5c1065f7d22047c (r64159). Revert "thread_pthread: remove timer-thread by restructuring GVL" This reverts commit 708bfd21156828526fe72de2cedecfaca6647dc1 (r64107). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-06Ignore native extension of Date library when syncing gemification files.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-06process.c: ensure th->interrupt lock is held when migratingnormal
w->cond may be changed without our knowledge in waitpid_nogvl without th->interrupt_lock git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-05process.c (rb_waitpid): reduce sigwait_fd bouncingnormal
Once a thread has acquired sigwait_fd, hold onto it until waitpid is complete. This prevents unnecessary migration and atomic operations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64200 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-05test/ruby/test_thread.rb (test_thread_timer_and_interrupt): add timeoutsnormal
Trying to diagnose CI failures from i686-linux on Debian 7. This also fixes a potential GC problem with Thread.start or IO#read potentially closing the write-end of the pipe due to allocation. cf. http://www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/log/20180805T080500Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-05* 2018-08-06svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64198 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-05thread_pthread: stop trying to deal with cancellationnormal
We don't use pthreads cancellation ourselves and it's painful to use correctly. Any cancelled threads would break vm->living_threads, GVL, thread_sync.c, autoload, etc... So don't bother caring; because we can't stop rogue extensions from completely breaking the VM in other ways, either. [ruby-core:88282] [Misc #14962] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-05mjit.c: use -Tc flag explicitlyk0kubun
This option makes sure that the argument is C source file. Probably this is not needed, but since I'm debugging it, I want to exclude any failure possibility for now. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-05test/ruby/test_process.rb (test_wait_and_sigchld): allow extra SIGCHLDnormal
MJIT way generate an extra SIGCHLD, so we'll have to deal with it. Any realistic Ruby program may hit unexpected SIGCHLD, too, since any spawned subprocess could have extra grandchildren which get reaped by the main Ruby process, and SIGCHLD may be sent spuriously by an external process using kill(2) syscall (via kill(1) or Process.kill). cf. http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1194620 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-05thread_pthread.c (native_sleep): reduce ppoll sleepsnormal
By holding into sigwait_fd until after we acquire GVL, we can hit the faster native_cond_sleep path instead of ppoll when another thread wants to start sleeping. ppoll-ing on sigwait_fd isn't really useful in program where GVL is contended This also allows reducing vm->gvl.lock mutex contention on waitpid sleep migrations. r64170 this patch vm_thread_condvar1 0.921 1.356 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-05mjit.c: link precompiled objectk0kubun
This is needed to resolve: "error LNK2011: precompiled object not linked in; image may not run" win32/Makefile.sub: Use the same flags as ones for precompiled header. This is needed to resolve: "error C2855: command-line option '/Z7' inconsistent with precompiled header" git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64192 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-05mjit.c: reorder functions to reduce #ifdef branchesk0kubun
Just moved make_pch into `#else` of `#ifdef _MSC_VER`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-05mjit.c: include prebuilt precompiled headerk0kubun
on mswin properly. Deleted code to attempt make_pch for mswin, since it won't be needed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-05mjit.c: initialize prebuilt precompiled headerk0kubun
file name correctly. This allows to use the header installed by r64188. win32/Makefile.sub: define prebuilt precompiled header path instead of unused min header path git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-04win32/Makefile.sub: build precompiled headerk0kubun
See the comment in win32/Makefile.sub. Not only .pch, but also .obj needs to be installed and used on runtime. .gitignore: ignore .pch that will be built by this. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-04test/ruby/test_io.rb (test_select_leak): speedup and reduce memory usenormal
We can reuse the sub-thread and exception with Thread#raise to reproduce the old memory leak with less overhead. This allows us to to run more iterations and improve reliability of the actual test, particularly on platforms without USE_THREAD_CACHE. For glibc and jemalloc, also limit arena count to avoid inadvertant growth. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-04test/ruby/test_thread.rb (test_thread_interrupt_for_killed_thread): conserve ↵normal
resources Use Thread.pass to let the sub-thread finish. This should avoid running out of memory on resource-constrained systems. (We don't want to use Thread#join to hit the exception) This results in a significant memory usage reduction in this test: make test-all TESTS='../test/ruby/test_thread.rb -v -n test_thread_interrupt_for_killed_thread' Before: 3.46user 2.02system 0:05.29elapsed 103%CPU (0avgtext+0avgdata 88672maxresident)k 0inputs+0outputs (0major+143071minor)pagefaults 0swaps After: 3.40user 1.83system 0:05.20elapsed 100%CPU (0avgtext+0avgdata 9368maxresident)k 0inputs+0outputs (0major+3059minor)pagefaults 0swaps cf. https://rubyci.org/logs/rubyci.s3.amazonaws.com/scw-9d6766/ruby-trunk/log/20180803T231706Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-04thread.c (consume_communication_pipe): do not retry after short readnormal
Saves a syscall and slightly improves vm_thread_condvar1 benchmark slightly (more improvements on the way): r64170 this patch vm_thread_condvar1 0.917 1.065 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-04test/ruby/test_io.rb (test_race_gets_and_close): timeout each threadnormal
Still looking into CI failures on P895 (and seemingly no other boxes): http://ci.rvm.jp/results/trunk@P895/1190369 :< git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-04* 2018-08-05svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-04common.mk: stop building MJIT min header for mswink0kubun
Since it's impossible to leave macro when preprocessing C source file with cl.exe, I decided to create precompiled header on Ruby's build time instead. We're not doing it for non-mswin environment for 2 reasons: 1) Precompiled header may not be able to be used when CC is upgraded. 2) We need to create as many precompiled headers as the patterns of compile options. (Probably only 2, for with and without --jit-debug) I'll ignore them for mswin for now, and solve it later by including CC version and --jit-debug information in precompiled header filename. After that, non-mswin environment may follow it to simplify build system. Makefile.in: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-03spec/ruby/library/socket/socket/getaddrinfo_spec.rb: avoid nonsensical lookupnormal
"http" is a TCP service, so /etc/services on typical GNU/Linux systems only specify a TCP port for it. Use "discard" since it seems used for other specs and is specified as both TCP and UDP. This caused many CI failures like the following: git clone https://gist.github.com/812a9b747e4c4cb2e844d4be7991cd2d git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-03Update to ruby/spec@9be7c7eeregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-03Update to ruby/mspec@072849eeregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-03encoding.c (rb_enc_get_index): return -1 for non-encoding capable objectseregon
* Clarify logic and add spec. * Now passes test-all with the JSON fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-03ext/json/parser/parser.c: do not call rb_str_resize() on Time objecteregon
* See https://github.com/flori/json/issues/342 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-03* 2018-08-04svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-03Fix missed update of parser source in r62429eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-03Revert "encoding.c (rb_enc_get_index): return -1 for non-encoding capable ↵eregon
objects" * This reverts commit fb253d2032e51f333e6577aa4fcf0c03f9c6fc02. * The CI is failing, this seems a bug in the JSON C extension. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-03encoding.c (rb_enc_get_index): return -1 for non-encoding capable objectseregon
* Clarify logic and add spec. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-03encoding.c (enc_set_index): raise instead of rb_bug() for non-encoding ↵eregon
capable objects * Add spec. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-03random.c: fix fallback valuenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-03random.c: use rb_check_funcallnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-03random.c: moved domain errornobu
* random.c (rand_range): moved call of domain_error(), not to raise an exception in range_values(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-03ast.c: allocator of Nodenobu
* ast.c (Init_ast): undefine allocator of Node, as a method call on an uninitialized Node causes segfault. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-03random.c: endless range randomnobu
* random.c (range_values): cannot determine the domain of an endless range. [ruby-core:88261] [Bug #14958] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-03thread_pthread.c: add a macro guard for PTHREAD_CANCEL_ENABLEmame
It seems to be unavailable on some platforms including my Android phone. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64166 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-02thread_pthread.c (gvl_acquire_common): persist timeout across callsnormal
Reuse old expiration time if the previous native_cond_timedwait did not return ETIMEDOUT. This should improve timeslice accuracy for Timeout.timeout rubyspec without causing excessive wakeups on uncontended GVL acquisition. cf. http://ci.rvm.jp/results/trunk-gc-asserts@silicon-docker/1180486 http://ci.rvm.jp/results/trunk-gc-asserts@silicon-docker/1184623 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-02* 2018-08-03svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-02test_jit.rb: split the test concernk0kubun
Actually unload_units is working on MinGW, but putiseq is behaving badly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-02mjit.c: skip compaction on MinGWk0kubun
because linking multiple .o files is problematic without having `static` to the same function definitions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-02mjit.c: don't apply workaround if --enable-load-relativek0kubun
is specified. This is needed for MinGW because MJIT_BUILD_DIR doesn't prefix path like "C:\msys64", so it can't be read without msys2's conversion. The workaround is not needed for Windows (LOAD_RELATIVE looks defined by default) anyway. So removed it for such environment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-02mjit.c: suppress warnings by -Wunused-valuek0kubun
on MinGW with __atomic_exchange_n(). It returns the previous pointer value but obviously it's not needed in MJIT's usage. mjit.c: In function 'compact_all_jit_code': ruby_atomic.h:11:36: warning: value computed is not used [-Wunused-value] # define ATOMIC_EXCHANGE(var, val) __atomic_exchange_n(&(var), (val), __ATOMIC_SEQ_CST) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-02thread_win32.c: suppress warnings by -Wsuggest-attributek0kubun
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-02* 2018-08-02svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-02test/socket/test_socket.rb (test_timestampns): retry sendnormal
It looks like we need to retry test_timestampns in addition to test_timestamp; so share some code while we're at it. cf. http://ci.rvm.jp/results/trunk-test@frontier/1153126 [ruby-core:88104] [Bug #14898] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e