summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-08-25drb: close graceful shutdown pipe before socketnormal
Closing a listen socket while entering select(2) may trigger IOError or even deadlock because another thread may give the file descriptor to another file description; meaning the kernel can wait on the wrong description. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-25drb: simplify shutdown pipe close logicnormal
IO#close is idempotent, so we don't need to waste bytecode to check or nil it at shutdown time. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-24Add AIX guardsnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-24test/ruby/test_io.rb (test_recycled_fd_close): use IO#read to avoid ppoll callnormal
IO#sysread calls rb_wait_for_single_fd for compatibility, and perhaps something is amiss with that (unrelated to timer-thread elimination) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-24* 2018-08-25svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-24thread_pthread.c: use eventfd instead of pipe on Linuxnormal
Based on r64478, any regular user creating more than 1024 pipes on Linux will end up with tiny pipes with only a single page capacity. So avoid wasting user resources and use lighter eventfd on Linux. [ruby-core:88563] [Misc #15011] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-24ext/readline/extconf.rb: try using more readline APIsk0kubun
on MinGW. [Bug #15020] From: MSP-Greg <Greg.mpls@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-23test/readline/test_readline.rb: fix readline testk0kubun
for mingw. test/lib/minitest/unit.rb: Add 'guards' for mingw. Removed still-unused method `mswin?` from original patch. [Fix GH-1941] From: MSP-Greg <MSP-Greg@users.noreply.github.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-23thread_pthread.c (ubf_timer_destroy): remove redundant getpid checknormal
TIMER_THREAD_CREATED_P already checks that pid, and glibc 2.25+ no longer caches getpid(2). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-23* 2018-08-24svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-23NEWS: add entries for rb_waitpid and timer-thread [ci skip]normal
Some of these changes may affect debugging and tracing tools [Bug #14867] [ruby-core:88199] [Misc #14937] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-23iseq.c (rb_vm_encoded_insn_data_table_init): add a cast to build on clangmame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-23Mention `--enable=jit` instead of `--jit`kazu
"--jit" flag usage may be deprecated at r63995 [Feature #14878] [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-23iseq.c (rb_iseq_trace_set): refactoring by using encoded_insn_datamame
Now it uses encoded_insn_data to identify and replace each encoded insn. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-23iseq.c: add a map from encoded insn to insn datamame
This enhances rb_vm_insn_addr2insn which retrieves a decoded insn number from encoded insn. The insn data table include not only decoded insn number, but also its len, trace and non-trace version of encoded insn. This table can be used to simplify trace instrumentation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-23compile.c: drop unused arraynobu
* compile.c (iseq_peephole_optimize): drop unused dynamic array literal, without concatenation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-23compile.c: drop unused stringnobu
* compile.c (iseq_peephole_optimize): drop unused dynamic string literal, without concatenation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-23remove `const` warning.ko1
* compile.c (iseq_ibf_load): remove `const` to pass iseq as no `const` parameter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-23check trace flags at loading [Bug #14702]ko1
* iseq.c (iseq_init_trace): at ISeq loading time, we need to check `ruby_vm_event_enabled_flags` to turn on trace instructions. Seprate this checking code from `finish_iseq_build()` and make new function. `iseq_ibf_load()` calls this funcation after loading. * test/ruby/test_iseq.rb: add a test for this fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-22Also skip on AIXnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-22compile.c: pop literal object in conditionnobu
* compile.c (compile_branch_condition): pop dynamic literal object, which is never nil/false, as the branch condition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-22* 2018-08-23svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64511 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-22parse.y (arg_append): support NODE_ARGSCAT casemame
Because of the lack of this case, `[*ary,1,2,3,4,5,6]` was parsed into an inefficient AST like `ary + [1,2] + [3,4] + [5,6]`. A patch from Anmol Chopra <anmolchopra@rocketbox.in>. Fixes [Bug #15018]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-22compile.c: remove tracecoverage instruction for line coveragemame
Line coverage was based on special instruction "tracecoverage". Now, instead, it uses the mechanism of trace hook [Feature #14104]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-22parse.y: remove coverage-related code fragmentsmame
The code fragments that initializes coverage data were scattered into both parse.y and compile.c. parse.y allocated a coverage data, and compile.c initialize the data. To remove this cross-cutting concern, this change moves the allocation from "coverage" function of parse.y to "rb_iseq_new_top" of iseq.c. For the sake, parse.y just counts the line number of the original source code, and the number is passed via rb_ast_body_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-22node.h (rb_ast_t): move its field mark_ary to node_buffer_tmame
I want to add a new field to rb_ast_t whose size is restricted because it is an imemo. This change makes one room in rb_ast_t. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-22prototizednobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-22common.mk: update "make help" so that "make check" now runs test-specmame
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-22thread.c (rb_reset_coverages): remove coverage counters from all ISeqsmame
When coverage measurement is enabled, the compiler makes each iseq have a reference to the counter array of coverage. Even after coverage measurement is disabled, the reference is kept. And, if coverage measurement is restarted, a coverage hook will increase the counter. This is completely meaningless; it brings just overhead. To remove this meaninglessness, this change removes all the reference when coverage measuement is stopped. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-22Avoid compiler depend errorkazu
ref r64492 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-21Run specs against 2.3.7 to ensure version guards are correctly addederegon
* See [Feature #15004]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-21Update to ruby/spec@dd828d6eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-21Update to ruby/mspec@269f9cderegon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-21Only run the spec on Linuxeregon
* Other platforms seem to behave differently. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-21Revert r64483eregon
* This reverts commit 12f624b673fd1bd1782f4c52e3b6c78d033e7b84: "Try 4 times for WIN32OLE specs" * It was a machine problem, it needed to be rebooted. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-21* 2018-08-22svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-21AIX also timeouts the specnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-21Add more assertions for NotImplementedError of instance methodkazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-21rename an argument of calc_wday.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-21Re-Revert "Temporary revert "process.c: dead code when no SIGCHLD""naruse
This re-reverts commit r64447. The issue was machine side problem. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-21cont.c: fix syntax errornobu
* cont.c (struct rb_fiber_struct): fix wrong usage of BITFIELD in r64487, which caused syntax error on pre-C99 compilers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-21common.mk: timestamp directorynobu
* common.mk: timestamp files need the timestamp directory. [Bug #15015] [ruby-core:88584] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-21thread*.c: replace GetMutexPtr with mutex_ptrnormal
Following ko1's lead in r59192, this gets rid of non-obvious assignments which happen inside macros. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-21cont.c: replace "GetFooPtr" macros with "foo_ptr" functionsnormal
Following ko1's lead in r59192, this gets rid of non-obvious assignments which happen inside macros. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-21internal.h: remove prototype for non-existent rb_divert_reserved_fdnormal
I forgot to remove it 3 years ago in r51576 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-20cont.c (struct rb_fiber_struct): bitfields for trasnferred and statusnormal
On 32-bit x86, this reduces the struct from 836 to 832 bytes and brings us down to 13 (64-byte) cachelines (from 14). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-20thread*.c: avoid unnecessary initialization for list_for_each_safenormal
According to r52446, it is only necessary for the current item (@i), not the `@nxt` parameter for list_for_each_safe. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-20thread_pthread.c: reinitialize ubf_list at forknormal
It's possible for the ubf_list_head to be populated with dead threads at fork or the ubf_list_lock to be held, so reinitialize both at startup. And while we're at it, use a static initializer at startup to save a library call and kill some ifdef. [ruby-core:88578] [Bug #15013] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-20test/socket/test_socket.rb (timestamp_retry_rw): IO.select before recvmsgnormal
CI failures are still happening from these tests, but try to break out of it earlier instead of holding up the job. [Bug #14898] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-20Try 4 times for WIN32OLE specseregon
* They seem to fail a lot on: http://mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-trunk/recent.html git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e