Bug #18985
closedSEGV with YJIT on aarch64-linux
Description
When we use -e
option with YJIT, It's always crush on aarch64-linux.
$ ruby --jit -e "puts :foo"
/home/chkbuild/.rbenv/versions/3.2.0-dev/lib/ruby/3.2.0+2/aarch64-linux/rbconfig.rb:305: [BUG] Segmentation fault at 0x00000e80f90003e0
ruby 3.2.0dev (2022-08-30T09:46:06Z master b98653f766) +YJIT [aarch64-linux]
-- Control frame information -----------------------------------------------
c:0012 p:0082 s:0059 e:000056 BLOCK /home/chkbuild/.rbenv/versions/3.2.0-dev/lib/ruby/3.2.0+2/aarch64-linux/rbconfig.rb:305 [FINISH]
c:0011 p:---- s:0049 e:000048 CFUNC :gsub
c:0010 p:0018 s:0044 e:000043 METHOD /home/chkbuild/.rbenv/versions/3.2.0-dev/lib/ruby/3.2.0+2/aarch64-linux/rbconfig.rb:298
c:0009 p:0013 s:0037 e:000036 BLOCK /home/chkbuild/.rbenv/versions/3.2.0-dev/lib/ruby/3.2.0+2/aarch64-linux/rbconfig.rb:316 [FINISH]
c:0008 p:---- s:0033 e:000032 CFUNC :each_value
c:0007 p:3778 s:0029 e:000028 CLASS /home/chkbuild/.rbenv/versions/3.2.0-dev/lib/ruby/3.2.0+2/aarch64-linux/rbconfig.rb:315
c:0006 p:0007 s:0026 e:000025 TOP /home/chkbuild/.rbenv/versions/3.2.0-dev/lib/ruby/3.2.0+2/aarch64-linux/rbconfig.rb:11 [FINISH]
c:0005 p:---- s:0023 e:000022 CFUNC :require
c:0004 p:0005 s:0018 e:000017 TOP /home/chkbuild/.rbenv/versions/3.2.0-dev/lib/ruby/3.2.0+2/rubygems.rb:8 [FINISH]
c:0003 p:---- s:0012 e:000011 CFUNC :require
c:0002 p:0012 s:0007 e:000006 TOP <internal:gem_prelude>:2 [FINISH]
c:0001 p:0000 s:0003 E:001e70 (none) [FINISH]
-- Ruby level backtrace information ----------------------------------------
<internal:gem_prelude>:2:in `<internal:gem_prelude>'
<internal:gem_prelude>:2:in `require'
/home/chkbuild/.rbenv/versions/3.2.0-dev/lib/ruby/3.2.0+2/rubygems.rb:8:in `<top (required)>'
/home/chkbuild/.rbenv/versions/3.2.0-dev/lib/ruby/3.2.0+2/rubygems.rb:8:in `require'
/home/chkbuild/.rbenv/versions/3.2.0-dev/lib/ruby/3.2.0+2/aarch64-linux/rbconfig.rb:11:in `<top (required)>'
/home/chkbuild/.rbenv/versions/3.2.0-dev/lib/ruby/3.2.0+2/aarch64-linux/rbconfig.rb:315:in `<module:RbConfig>'
/home/chkbuild/.rbenv/versions/3.2.0-dev/lib/ruby/3.2.0+2/aarch64-linux/rbconfig.rb:315:in `each_value'
/home/chkbuild/.rbenv/versions/3.2.0-dev/lib/ruby/3.2.0+2/aarch64-linux/rbconfig.rb:316:in `block in <module:RbConfig>'
/home/chkbuild/.rbenv/versions/3.2.0-dev/lib/ruby/3.2.0+2/aarch64-linux/rbconfig.rb:298:in `expand'
/home/chkbuild/.rbenv/versions/3.2.0-dev/lib/ruby/3.2.0+2/aarch64-linux/rbconfig.rb:298:in `gsub'
/home/chkbuild/.rbenv/versions/3.2.0-dev/lib/ruby/3.2.0+2/aarch64-linux/rbconfig.rb:305:in `block in expand'
-- Machine register context ------------------------------------------------
x0: 0x0000ffff8eb14d18 x1: 0xf0000e80f90003e0 x2: 0x0000aaaae6fc1010
x3: 0x0000aaaae6fc1010 x4: 0x0000000000000000 x5: 0x0000aaaae70d5210
x6: 0x0000000000000218 x7: 0x0000000000000007 x18: 0x0000ffffe56ea2f0
x19: 0x0000aaaae71566d0 x20: 0x0000ffff8ec27d10 x21: 0x0000aaaae6fc6560
x22: 0x0000aaaac8c5d310 x23: 0x0000ffff8b5a7bd0 x24: 0x0000aaaae71566c0
x25: 0x0000ffff8eb18580 x26: 0x0000aaaae7154370 x27: 0x000000000000000a
x28: 0x0000ffff8eb18508 x29: 0x0000ffffe56ea8b0 sp: 0x0000ffffe56ea8a0
fau: 0x00000e80f90003e0
-- C level backtrace information -------------------------------------------
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(rb_vm_bugreport+0x664) [0xaaaac8c4305c] vm_dump.c:762
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(rb_bug_for_fatal_signal+0xd4) [0xaaaac8db5334] error.c:817
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(sigsegv+0x5c) [0xaaaac8b99154] signal.c:964
linux-vdso.so.1(__kernel_rt_sigreturn+0x0) [0xffff8f28578c]
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(vm_exec_core+0x1c0) [0xaaaac8c35178] vm.inc:2234
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(rb_vm_exec+0x144) [0xaaaac8c269ac] vm.c:2388
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(rb_yield+0x1fc) [0xaaaac8c2b5c4] vm.c:1416
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(str_gsub+0x4a0) [0xaaaac8bc15b0] string.c:5902
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(vm_call_cfunc_with_frame+0xf8) [0xaaaac8c1a7c8] vm_insnhelper.c:3020
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(vm_sendish+0x134) [0xaaaac8c1ef8c] vm_insnhelper.c:4775
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(vm_exec_core+0x210) [0xaaaac8c351c8] insns.def:778
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(rb_vm_exec+0x144) [0xaaaac8c269ac] vm.c:2388
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(rb_yield+0x1fc) [0xaaaac8c2b5c4] vm.c:1416
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(each_value_i+0x14) [0xaaaac8a795f4] hash.c:3042
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(hash_foreach_iter+0x28) [0xaaaac8a7ab30] hash.c:1378
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(rb_st_foreach_check+0x7c) [0xaaaac8ba5f64] st.c:1479
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(hash_foreach_call+0xf4) [0xaaaac8a7e794] hash.c:1507
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(rb_ensure+0xf8) [0xaaaac8a51ea8] eval.c:994
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(rb_hash_foreach+0x98) [0xaaaac8a7eb70] hash.c:1531
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(rb_hash_each_value+0x40) [0xaaaac8a815f0] hash.c:1521
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(vm_call_cfunc_with_frame+0xf8) [0xaaaac8c1a7c8] vm_insnhelper.c:3020
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(vm_call_method_each_type+0x204) [0xaaaac8c279ec] vm_insnhelper.c:3645
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(vm_call_method+0xc4) [0xaaaac8c27fdc] vm_insnhelper.c:3755
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(vm_sendish+0x134) [0xaaaac8c1ef8c] vm_insnhelper.c:4775
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(vm_exec_core+0x210) [0xaaaac8c351c8] insns.def:778
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(rb_vm_exec+0x144) [0xaaaac8c269ac] vm.c:2388
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(require_internal+0xa8c) [0xaaaac8abbeb4] load.c:693
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(rb_f_require+0x48) [0xaaaac8abc018] load.c:1261
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(vm_call_cfunc_with_frame+0xf8) [0xaaaac8c1a7c8] vm_insnhelper.c:3020
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(vm_exec_core+0x154) [0xaaaac8c3510c] vm_insnhelper.c:4775
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(rb_vm_exec+0x144) [0xaaaac8c269ac] vm.c:2388
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(require_internal+0xa8c) [0xaaaac8abbeb4] load.c:693
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(rb_f_require+0x48) [0xaaaac8abc018] load.c:1261
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(vm_call_cfunc_with_frame+0xf8) [0xaaaac8c1a7c8] vm_insnhelper.c:3020
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(vm_call_method_each_type+0x204) [0xaaaac8c279ec] vm_insnhelper.c:3645
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(vm_call_method+0xc4) [0xaaaac8c27fdc] vm_insnhelper.c:3755
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(vm_exec_core+0x154) [0xaaaac8c3510c] vm_insnhelper.c:4775
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(rb_vm_exec+0x144) [0xaaaac8c269ac] vm.c:2388
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(ruby_opt_init+0x54) [0xaaaac8b95c74] ruby.c:1530
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(ruby_opt_init+0x14) [0xaaaac8b9739c] ruby.c:1549
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(process_options) ruby.c:2044
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(ruby_process_options+0x154) [0xaaaac8b97efc] ruby.c:2673
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(ruby_options+0xd8) [0xaaaac8a50cc0] eval.c:118
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(rb_main+0x14) [0xaaaac8a4b72c] ./main.c:38
/home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby(main) ./main.c:57
[0xffff8ef63e10]
[0xaaaac8a4b7b4]
-- Other runtime information -----------------------------------------------
* Loaded script: ruby
* Loaded features:
0 enumerator.so
1 thread.rb
2 fiber.so
3 rational.so
4 complex.so
5 ruby2_keywords.rb
6 /home/chkbuild/.rbenv/versions/3.2.0-dev/lib/ruby/3.2.0+2/aarch64-linux/enc/encdb.so
7 /home/chkbuild/.rbenv/versions/3.2.0-dev/lib/ruby/3.2.0+2/aarch64-linux/enc/trans/transdb.so
* Process memory map:
aaaac89b0000-aaaac8f53000 r-xp 00000000 103:01 574112 /home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby
aaaac8f63000-aaaac8f78000 r--p 005a3000 103:01 574112 /home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby
aaaac8f78000-aaaac8f79000 rw-p 005b8000 103:01 574112 /home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby
aaaac8f79000-aaaac8f8a000 rw-p 00000000 00:00 0
aaaac904b000-aaaac904c000 r-xp 00000000 00:00 0
aaaac904c000-aaaad104b000 ---p 00000000 00:00 0
aaaad104b000-aaaad104c000 r-xp 00000000 00:00 0
aaaad104c000-aaaad904b000 ---p 00000000 00:00 0
aaaae6fc1000-aaaae7179000 rw-p 00000000 00:00 0 [heap]
ffff88aaf000-ffff8b560000 r--s 00000000 103:01 574112 /home/chkbuild/.rbenv/versions/3.2.0-dev/bin/ruby
ffff8b560000-ffff8b5b0000 rw-p 00000000 00:00 0
ffff8b5ba000-ffff8b5bc000 r-xp 00000000 103:01 574145 /home/chkbuild/.rbenv/versions/3.2.0-dev/lib/ruby/3.2.0+2/aarch64-linux/enc/trans/transdb.so
ffff8b5bc000-ffff8b5cb000 ---p 00002000 103:01 574145 /home/chkbuild/.rbenv/versions/3.2.0-dev/lib/ruby/3.2.0+2/aarch64-linux/enc/trans/transdb.so
ffff8b5cb000-ffff8b5cc000 r--p 00001000 103:01 574145 /home/chkbuild/.rbenv/versions/3.2.0-dev/lib/ruby/3.2.0+2/aarch64-linux/enc/trans/transdb.so
ffff8b5cc000-ffff8b5cd000 rw-p 00002000 103:01 574145 /home/chkbuild/.rbenv/versions/3.2.0-dev/lib/ruby/3.2.0+2/aarch64-linux/enc/trans/transdb.so
ffff8b5cd000-ffff8b5cf000 r-xp 00000000 103:01 574168 /home/chkbuild/.rbenv/versions/3.2.0-dev/lib/ruby/3.2.0+2/aarch64-linux/enc/encdb.so
ffff8b5cf000-ffff8b5de000 ---p 00002000 103:01 574168 /home/chkbuild/.rbenv/versions/3.2.0-dev/lib/ruby/3.2.0+2/aarch64-linux/enc/encdb.so
ffff8b5de000-ffff8b5df000 r--p 00001000 103:01 574168 /home/chkbuild/.rbenv/versions/3.2.0-dev/lib/ruby/3.2.0+2/aarch64-linux/enc/encdb.so
ffff8b5df000-ffff8b5e0000 rw-p 00002000 103:01 574168 /home/chkbuild/.rbenv/versions/3.2.0-dev/lib/ruby/3.2.0+2/aarch64-linux/enc/encdb.so
ffff8b5e0000-ffff8b5e1000 ---p 00000000 00:00 0
ffff8b5e1000-ffff8b682000 rw-p 00000000 00:00 0
ffff8b682000-ffff8b683000 ---p 00000000 00:00 0
ffff8b683000-ffff8b724000 rw-p 00000000 00:00 0
ffff8b724000-ffff8b725000 ---p 00000000 00:00 0
ffff8b725000-ffff8b7c6000 rw-p 00000000 00:00 0
ffff8b7c6000-ffff8b7c7000 ---p 00000000 00:00 0
ffff8b7c7000-ffff8b868000 rw-p 00000000 00:00 0
ffff8b868000-ffff8b869000 ---p 00000000 00:00 0
ffff8b869000-ffff8b90a000 rw-p 00000000 00:00 0
ffff8b90a000-ffff8b90b000 ---p 00000000 00:00 0
ffff8b90b000-ffff8b9ac000 rw-p 00000000 00:00 0
ffff8b9ac000-ffff8b9ad000 ---p 00000000 00:00 0
ffff8b9ad000-ffff8ba4e000 rw-p 00000000 00:00 0
ffff8ba4e000-ffff8ba4f000 ---p 00000000 00:00 0
ffff8ba4f000-ffff8baf0000 rw-p 00000000 00:00 0
ffff8baf0000-ffff8baf1000 ---p 00000000 00:00 0
ffff8baf1000-ffff8bb92000 rw-p 00000000 00:00 0
ffff8bb92000-ffff8bb93000 ---p 00000000 00:00 0
ffff8bb93000-ffff8bc34000 rw-p 00000000 00:00 0
ffff8bc34000-ffff8bc35000 ---p 00000000 00:00 0
ffff8bc35000-ffff8bcd6000 rw-p 00000000 00:00 0
ffff8bcd6000-ffff8bcd7000 ---p 00000000 00:00 0
ffff8bcd7000-ffff8bd78000 rw-p 00000000 00:00 0
ffff8bd78000-ffff8bd79000 ---p 00000000 00:00 0
ffff8bd79000-ffff8be1a000 rw-p 00000000 00:00 0
ffff8be1a000-ffff8be1b000 ---p 00000000 00:00 0
ffff8be1b000-ffff8bebc000 rw-p 00000000 00:00 0
ffff8bebc000-ffff8bebd000 ---p 00000000 00:00 0
ffff8bebd000-ffff8bf5e000 rw-p 00000000 00:00 0
ffff8bf5e000-ffff8bf5f000 ---p 00000000 00:00 0
ffff8bf5f000-ffff8c000000 rw-p 00000000 00:00 0
ffff8c000000-ffff8c001000 ---p 00000000 00:00 0
ffff8c001000-ffff8c0a2000 rw-p 00000000 00:00 0
ffff8c0a2000-ffff8c0a3000 ---p 00000000 00:00 0
ffff8c0a3000-ffff8c144000 rw-p 00000000 00:00 0
ffff8c144000-ffff8c145000 ---p 00000000 00:00 0
ffff8c145000-ffff8c1e6000 rw-p 00000000 00:00 0
ffff8c1e6000-ffff8c1e7000 ---p 00000000 00:00 0
ffff8c1e7000-ffff8c288000 rw-p 00000000 00:00 0
ffff8c288000-ffff8c289000 ---p 00000000 00:00 0
ffff8c289000-ffff8c32a000 rw-p 00000000 00:00 0
ffff8c32a000-ffff8c32b000 ---p 00000000 00:00 0
ffff8c32b000-ffff8c3cc000 rw-p 00000000 00:00 0
ffff8c3cc000-ffff8c3cd000 ---p 00000000 00:00 0
ffff8c3cd000-ffff8c46e000 rw-p 00000000 00:00 0
ffff8c46e000-ffff8c46f000 ---p 00000000 00:00 0
ffff8c46f000-ffff8c510000 rw-p 00000000 00:00 0
ffff8c510000-ffff8c511000 ---p 00000000 00:00 0
ffff8c511000-ffff8c5b2000 rw-p 00000000 00:00 0
ffff8c5b2000-ffff8c5b3000 ---p 00000000 00:00 0
ffff8c5b3000-ffff8c654000 rw-p 00000000 00:00 0
ffff8c654000-ffff8c655000 ---p 00000000 00:00 0
ffff8c655000-ffff8c6f6000 rw-p 00000000 00:00 0
ffff8c6f6000-ffff8c6f7000 ---p 00000000 00:00 0
ffff8c6f7000-ffff8c798000 rw-p 00000000 00:00 0
ffff8c798000-ffff8c799000 ---p 00000000 00:00 0
ffff8c799000-ffff8c83a000 rw-p 00000000 00:00 0
ffff8c83a000-ffff8c83b000 ---p 00000000 00:00 0
ffff8c83b000-ffff8c8dc000 rw-p 00000000 00:00 0
ffff8c8dc000-ffff8c8dd000 ---p 00000000 00:00 0
ffff8c8dd000-ffff8c97e000 rw-p 00000000 00:00 0
ffff8c97e000-ffff8c97f000 ---p 00000000 00:00 0
ffff8c97f000-ffff8ca50000 rw-p 00000000 00:00 0
ffff8ca56000-ffff8eb20000 rw-p 00000000 00:00 0
ffff8eb28000-ffff8ec29000 rw-p 00000000 00:00 0
ffff8ec29000-ffff8ec5b000 r--p 00000000 103:01 3487 /usr/lib/locale/C.UTF-8/LC_CTYPE
ffff8ec5b000-ffff8ef41000 r--p 00000000 103:01 11127 /usr/lib/locale/locale-archive
ffff8ef41000-ffff8ef43000 rw-p 00000000 00:00 0
ffff8ef43000-ffff8f09e000 r-xp 00000000 103:01 13668 /usr/lib/aarch64-linux-gnu/libc-2.31.so
ffff8f09e000-ffff8f0ad000 ---p 0015b000 103:01 13668 /usr/lib/aarch64-linux-gnu/libc-2.31.so
ffff8f0ad000-ffff8f0b1000 r--p 0015a000 103:01 13668 /usr/lib/aarch64-linux-gnu/libc-2.31.so
ffff8f0b1000-ffff8f0b3000 rw-p 0015e000 103:01 13668 /usr/lib/aarch64-linux-gnu/libc-2.31.so
ffff8f0b3000-ffff8f0b6000 rw-p 00000000 00:00 0
ffff8f0b6000-ffff8f0c9000 r-xp 00000000 103:01 3886 /usr/lib/aarch64-linux-gnu/libgcc_s.so.1
ffff8f0c9000-ffff8f0d8000 ---p 00013000 103:01 3886 /usr/lib/aarch64-linux-gnu/libgcc_s.so.1
ffff8f0d8000-ffff8f0d9000 r--p 00012000 103:01 3886 /usr/lib/aarch64-linux-gnu/libgcc_s.so.1
ffff8f0d9000-ffff8f0da000 rw-p 00013000 103:01 3886 /usr/lib/aarch64-linux-gnu/libgcc_s.so.1
ffff8f0da000-ffff8f0f6000 r-xp 00000000 103:01 13680 /usr/lib/aarch64-linux-gnu/libpthread-2.31.so
ffff8f0f6000-ffff8f105000 ---p 0001c000 103:01 13680 /usr/lib/aarch64-linux-gnu/libpthread-2.31.so
ffff8f105000-ffff8f106000 r--p 0001b000 103:01 13680 /usr/lib/aarch64-linux-gnu/libpthread-2.31.so
ffff8f106000-ffff8f107000 rw-p 0001c000 103:01 13680 /usr/lib/aarch64-linux-gnu/libpthread-2.31.so
ffff8f107000-ffff8f10b000 rw-p 00000000 00:00 0
ffff8f10b000-ffff8f1a4000 r-xp 00000000 103:01 13670 /usr/lib/aarch64-linux-gnu/libm-2.31.so
ffff8f1a4000-ffff8f1b4000 ---p 00099000 103:01 13670 /usr/lib/aarch64-linux-gnu/libm-2.31.so
ffff8f1b4000-ffff8f1b5000 r--p 00099000 103:01 13670 /usr/lib/aarch64-linux-gnu/libm-2.31.so
ffff8f1b5000-ffff8f1b6000 rw-p 0009a000 103:01 13670 /usr/lib/aarch64-linux-gnu/libm-2.31.so
ffff8f1b6000-ffff8f1e5000 r-xp 00000000 103:01 3378 /usr/lib/aarch64-linux-gnu/libcrypt.so.1.1.0
ffff8f1e5000-ffff8f1f5000 ---p 0002f000 103:01 3378 /usr/lib/aarch64-linux-gnu/libcrypt.so.1.1.0
ffff8f1f5000-ffff8f1f6000 r--p 0002f000 103:01 3378 /usr/lib/aarch64-linux-gnu/libcrypt.so.1.1.0
ffff8f1f6000-ffff8f1f7000 rw-p 00030000 103:01 3378 /usr/lib/aarch64-linux-gnu/libcrypt.so.1.1.0
ffff8f1f7000-ffff8f1ff000 rw-p 00000000 00:00 0
ffff8f1ff000-ffff8f202000 r-xp 00000000 103:01 13669 /usr/lib/aarch64-linux-gnu/libdl-2.31.so
ffff8f202000-ffff8f211000 ---p 00003000 103:01 13669 /usr/lib/aarch64-linux-gnu/libdl-2.31.so
ffff8f211000-ffff8f212000 r--p 00002000 103:01 13669 /usr/lib/aarch64-linux-gnu/libdl-2.31.so
ffff8f212000-ffff8f213000 rw-p 00003000 103:01 13669 /usr/lib/aarch64-linux-gnu/libdl-2.31.so
ffff8f213000-ffff8f21a000 r-xp 00000000 103:01 13682 /usr/lib/aarch64-linux-gnu/librt-2.31.so
ffff8f21a000-ffff8f229000 ---p 00007000 103:01 13682 /usr/lib/aarch64-linux-gnu/librt-2.31.so
ffff8f229000-ffff8f22a000 r--p 00006000 103:01 13682 /usr/lib/aarch64-linux-gnu/librt-2.31.so
ffff8f22a000-ffff8f22b000 rw-p 00007000 103:01 13682 /usr/lib/aarch64-linux-gnu/librt-2.31.so
ffff8f22b000-ffff8f244000 r-xp 00000000 103:01 9812 /usr/lib/aarch64-linux-gnu/libz.so.1.2.11
ffff8f244000-ffff8f253000 ---p 00019000 103:01 9812 /usr/lib/aarch64-linux-gnu/libz.so.1.2.11
ffff8f253000-ffff8f254000 r--p 00018000 103:01 9812 /usr/lib/aarch64-linux-gnu/libz.so.1.2.11
ffff8f254000-ffff8f255000 rw-p 00019000 103:01 9812 /usr/lib/aarch64-linux-gnu/libz.so.1.2.11
ffff8f255000-ffff8f276000 r-xp 00000000 103:01 13664 /usr/lib/aarch64-linux-gnu/ld-2.31.so
ffff8f277000-ffff8f27b000 rw-p 00000000 00:00 0
ffff8f27c000-ffff8f283000 r--s 00000000 103:01 19337 /usr/lib/aarch64-linux-gnu/gconv/gconv-modules.cache
ffff8f283000-ffff8f285000 r--p 00000000 00:00 0 [vvar]
ffff8f285000-ffff8f286000 r-xp 00000000 00:00 0 [vdso]
ffff8f286000-ffff8f287000 r--p 00021000 103:01 13664 /usr/lib/aarch64-linux-gnu/ld-2.31.so
ffff8f287000-ffff8f289000 rw-p 00022000 103:01 13664 /usr/lib/aarch64-linux-gnu/ld-2.31.so
ffffe4ef0000-ffffe56ef000 rw-p 00000000 00:00 0 [stack]
Aborted (core dumped)
Updated by maximecb (Maxime Chevalier-Boisvert) over 2 years ago
Hello @hsbt (Hiroshi SHIBATA).
Can you provide more details as to which version of Linux and which CPU you are running? Are you running this on a Raspberry Pi, or is this on an AWS Graviton instance?
It might also be useful for us if you can try an even simpler test (no call to puts) and report if it crashes:
$ ruby --yjit -e0
If you can run this command, it can produce a trace of what YJIT is doing which could also be helpful in debugging:
$ ruby --yjit --yjit-dump-insns -e0
Updated by hsbt (Hiroshi SHIBATA) over 2 years ago
- Status changed from Open to Assigned
- Assignee set to maximecb (Maxime Chevalier-Boisvert)
It's AWS c6g
instance with Ubuntu 20.04.5.
Linux rubyci-ubuntu2004-arm 5.13.0-1022-aws #24~20.04.1-Ubuntu SMP Thu Apr 7 22:14:11 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux
And I build ruby with ruby-build
. It's simply add --enable-yjit
option.
FYI: macOS 13.0 Ventura beta4 on M1 chip is working with same command.
$ ruby --jit -v -e "puts :foo"
ruby 3.2.0dev (2022-08-29T16:55:57Z master 737402e938) +YJIT [arm64-darwin22]
foo
Updated by k0kubun (Takashi Kokubun) over 2 years ago
- Status changed from Assigned to Closed
Applied in changeset git|064944c9029fae0552f120ea586f4f83ce206ec6.
Stop using a callee-saved register for scratch0 on aarch64 (#6312)
[Bug #18985]
-
Callee-save x22 for aarch64
-
Just use a caller-saved register
-
Update yjit/src/backend/arm64/mod.rs
Co-authored-by: Alan Wu alansi.xingwu@shopify.com
Co-authored-by: Maxime Chevalier-Boisvert maximechevalierb@gmail.com
Updated by k0kubun (Takashi Kokubun) over 2 years ago
merged the fix. it should be working now.
Updated by hsbt (Hiroshi SHIBATA) over 2 years ago
Thanks, I also confirm working it.
chkbuild@rubyci-ubuntu2004-arm:~$ ruby --jit -v -e "puts :foo"
ruby 3.2.0dev (2022-09-01T22:21:12Z master 3401e58f23) +YJIT [aarch64-linux]
foo