summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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
2018-08-20Revert r64471eregon
* This reverts commit 9ab04897bd06767f773b35c6958a0551981093aa: "don't run specs add at r64409 on Windows" * It doesn't seem to help: http://mswinci.japaneast.cloudapp.azure.com/vc12-x64/ruby-trunk/recent.html git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-20* 2018-08-21svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-20Remove extra semicolonkazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-20Update link to Email address specificationkazu
The current link leads to 404, I updated to the actual one. [Fix GH-1929] [ci skip] Author: Nikolay Belov <travelerspb@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-20spec/ruby/core/io/select_spec.rb: workaround stuck IO.selectnormal
Under pipe page memory pressure on Linux, a pipe may only be created with a single buffer[1]. And as of Linux v4.18, the fs/pipe.c::pipe_poll callback does not account for merging done in fs/pipe::pipe_write; only the number of usable buffers in the pipe. Thus it is possible for a pipe to be writable (if only by a small amount) despite IO.select saying it is not. With the default 16384 /proc/sys/fs/pipe-user-pages-soft value and the pipe having 16 pages of buffers, this issue is trivially reproducible by creating 1024 pipes in a background process before running the spec: $ ulimit -n 2053 # or something higher $ ./miniruby -e '1024.times.map { IO.pipe }; sleep' & $ make test-spec MSPECOPT=spec/ruby/core/io/select_spec.rb So, we create a new pipe we never write to for testing writability of IO.select. This may cause the test to fail with ENFILE on an overloaded system, but at least that's an obvious failure (unlike having a test get stuck). This should reduce failures on our overloaded CI machines: http://ci.rvm.jp/results/trunk-nopara@silicon-docker/1239426 [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/pipe.c?h=v4.18#n642 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-19thread_sync.c (rb_condvar_initialize): remove extra semicolonnormal
Oops :x git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-19thread_sync.c (rb_mutex_sleep): disable interrupt checking in ensurenormal
This is needed to reliably fix ConditionVariable#wait on Thread#kill [Bug #14999] because there is still a chance an interrupt could fire and prevent lock acquisition after an ensure statement. Arguably, rb_mutex_lock itself should be uninterruptible, but that already prevents bootstraptest/test_thread.rb from completing and probably breaks existing use cases. For reference, POSIX expressly forbids EINTR from pthread_mutex_lock. [ruby-core:88556] [Bug #14999] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e