Actions
Bug #17667
closedModule#name needs synchronization
Description
class C; @iv = 1; end
Ractor.new{
loop{C.name}
}
class C
0.step{|i| instance_variable_set("@iv#{i}", i)}
end
/home/ko1/ruby/src/trunk/test.rb:4: [BUG] Segmentation fault at 0x000056513df4ef10
ruby 3.1.0dev (2021-02-28T11:24:42Z master 80e2c45f55) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0005 p:---- s:0017 e:000016 CFUNC :name
c:0004 p:0011 s:0013 e:000012 BLOCK /home/ko1/ruby/src/trunk/test.rb:4 [FINISH]
c:0003 p:---- s:0010 e:000009 CFUNC :loop
c:0002 p:0004 s:0006 e:000005 BLOCK /home/ko1/ruby/src/trunk/test.rb:4 [FINISH]
c:0001 p:---- s:0003 e:000002 (none) [FINISH]
-- Ruby level backtrace information ----------------------------------------
/home/ko1/ruby/src/trunk/test.rb:4:in `block in <main>'
/home/ko1/ruby/src/trunk/test.rb:4:in `loop'
/home/ko1/ruby/src/trunk/test.rb:4:in `block (2 levels) in <main>'
/home/ko1/ruby/src/trunk/test.rb:4:in `name'
-- Machine register context ------------------------------------------------
RIP: 0x000056513dbe09dc RBP: 0x000000000000000e RSP: 0x00007f96276e2140
RAX: 0x000056513df4ef10 RBX: 0x0000000000001238 RCX: 0x000000000000000d
RDX: 0x0000000000000ee1 RDI: 0x000056513de6f040 RSI: 0x0000000000000001
R8: 0x000056513deedb00 R9: 0x000056513dec70c0 R10: 0x0000000000000000
R11: 0x00007f96276e2d29 R12: 0x00000000000040d8 R13: 0x000056513dea2470
R14: 0x00000000000076d5 R15: 0xffffffffffffffff EFL: 0x0000000000010206
-- C level backtrace information -------------------------------------------
/home/ko1/ruby/build/trunk/miniruby(rb_print_backtrace+0x11) [0x56513dc7e67e] /home/ko1/ruby/src/trunk/vm_dump.c:758
/home/ko1/ruby/build/trunk/miniruby(rb_vm_bugreport) /home/ko1/ruby/src/trunk/vm_dump.c:1042
/home/ko1/ruby/build/trunk/miniruby(rb_bug_for_fatal_signal+0xf4) [0x56513da892e4] /home/ko1/ruby/src/trunk/error.c:801
/home/ko1/ruby/build/trunk/miniruby(sigsegv+0x4d) [0x56513dbd5cbd] /home/ko1/ruby/src/trunk/signal.c:960
/lib/x86_64-linux-gnu/libpthread.so.0(__restore_rt+0x0) [0x7f962b7283c0] ../sysdeps/pthread/funlockfile.c:28
/home/ko1/ruby/build/trunk/miniruby(find_table_entry_ind+0x5c) [0x56513dbe09dc] /home/ko1/ruby/src/trunk/st.c:839
/home/ko1/ruby/build/trunk/miniruby(rb_st_lookup+0x4a) [0x56513dbe16fa] /home/ko1/ruby/src/trunk/st.c:1021
/home/ko1/ruby/build/trunk/miniruby(classname+0x79) [0x56513dc46380] /home/ko1/ruby/src/trunk/variable.c:102
/home/ko1/ruby/build/trunk/miniruby(rb_mod_name+0x32) [0x56513dc46405] /home/ko1/ruby/src/trunk/variable.c:121
/home/ko1/ruby/build/trunk/miniruby(vm_call_cfunc_with_frame+0x11b) [0x56513dc562eb] /home/ko1/ruby/src/trunk/vm_insnhelper.c:2924
/home/ko1/ruby/build/trunk/miniruby(vm_sendish+0xe) [0x56513dc63957] /home/ko1/ruby/src/trunk/vm_insnhelper.c:4525
Actions
Like0
Like0