From: ko1@... Date: 2018-12-13T01:33:53+00:00 Subject: [ruby-core:90471] [Ruby trunk Bug#15406] Loaded iseq may cause SEGV on GC Issue #15406 has been updated by ko1 (Koichi Sasada). This patch will fix. Aaron, could you confirm it? ``` Index: compile.c =================================================================== --- compile.c (revision 66375) +++ compile.c (working copy) @@ -8786,7 +8786,6 @@ ibf_load_code(const struct ibf_load *loa /* code[code_index] = op; */ continue; } - load_body->iseq_size = code_index + 1; } if (insn_len(insn) != op_index+1) { rb_raise(rb_eRuntimeError, "operand size mismatch"); ``` ---------------------------------------- Bug #15406: Loaded iseq may cause SEGV on GC https://bugs.ruby-lang.org/issues/15406#change-75629 * Author: wanabe (_ wanabe) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.6.0dev (2018-12-13 trunk 66370) [x86_64-linux] * Backport: 2.4: UNKNOWN, 2.5: UNKNOWN ---------------------------------------- Attached `test.rb` causes SEGV on trunk r66370. `test.log` is stderr log. I don't known what `[0, 13, 0]` means, but I guess environment dependent. `./miniruby test.rb 4 17 0` also causes SEGV on mn environment but `./miniruby test.rb 4 16 0` doesn't. Note: I've found the issue during the investigation of #15395, but I don't know it is related or not. ---Files-------------------------------- test.rb (282 Bytes) test.log (10.5 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: