Project

General

Profile

Actions

Bug #20561

closed

Segfault with attr_writer, safe navigation and an "in" loop

Added by herwin (Herwin W) 5 months ago. Updated 5 months ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 3.3.2 (2024-05-30 revision e5a195edf6) [x86_64-linux]
[ruby-core:118217]

Description

class Foo
  attr_accessor :bar
end

foo = Foo.new
for foo&.bar in [1,2,3]
  p foo
end

This code works fine when using foo.bar in the loop, without the safe navigator, but the safe navigator results in a segfault. Seen with versions 3.1.6, 3.2.4, 3.3.2 and 3.4.0-preview1.

Full output for version 3.3.2:

in.rb: [BUG] Segmentation fault at 0x0000000000000000
ruby 3.3.2 (2024-05-30 revision e5a195edf6) [x86_64-linux]

-- Control frame information -----------------------------------------------
c:0001 p:0000 s:0003 E:000320 DUMMY  [FINISH]


-- Threading information ---------------------------------------------------
Total ractor count: 1
Ruby thread count for this ractor: 1

-- Machine register context ------------------------------------------------
 RIP: 0x00007fa789099da6 RBP: 0x00007fa78868edb8 RSP: 0x00007fffeb7f6fa0
 RAX: 0x0000000000000000 RBX: 0x000055b008211220 RCX: 0x000055b0081b9810
 RDX: 0x0000000000000000 RDI: 0x000055b0081b9840 RSI: 0x0000000000000023
  R8: 0x0000000000000000  R9: 0x000055b0081b9840 R10: 0x0000000000000001
 R11: 0x00007fa78868edb8 R12: 0x00007fa78946429c R13: 0x0000000000000000
 R14: 0x0000000000000042 R15: 0x0000000000000042 EFL: 0x0000000000010246

-- C level backtrace information -------------------------------------------
lib/libruby.so.3.3(rb_print_backtrace+0x14) [0x7fa78931ca5b] /tmp/ruby-build.20240530181640.5619.rzPMtg/ruby-3.3.2/vm_dump.c:820
lib/libruby.so.3.3(rb_vm_bugreport) /tmp/ruby-build.20240530181640.5619.rzPMtg/ruby-3.3.2/vm_dump.c:1151
lib/libruby.so.3.3(rb_bug_for_fatal_signal+0x100) [0x7fa789112ec0] /tmp/ruby-build.20240530181640.5619.rzPMtg/ruby-3.3.2/error.c:1065
lib/libruby.so.3.3(sigsegv+0x4d) [0x7fa789265ded] /tmp/ruby-build.20240530181640.5619.rzPMtg/ruby-3.3.2/signal.c:926
/lib/x86_64-linux-gnu/libc.so.6(0x7fa788d76580) [0x7fa788d76580]
lib/libruby.so.3.3(iseq_peephole_optimize+0x3d6) [0x7fa789099da6] /tmp/ruby-build.20240530181640.5619.rzPMtg/ruby-3.3.2/compile.c:2874
lib/libruby.so.3.3(iseq_optimize+0x128) [0x7fa78909b618] /tmp/ruby-build.20240530181640.5619.rzPMtg/ruby-3.3.2/compile.c:4145
lib/libruby.so.3.3(iseq_setup_insn) /tmp/ruby-build.20240530181640.5619.rzPMtg/ruby-3.3.2/compile.c:1615
lib/libruby.so.3.3(iseq_setup_insn) /tmp/ruby-build.20240530181640.5619.rzPMtg/ruby-3.3.2/compile.c:1604
lib/libruby.so.3.3(rb_iseq_compile_node+0x157) [0x7fa7890b0e67] /tmp/ruby-build.20240530181640.5619.rzPMtg/ruby-3.3.2/compile.c:966
lib/libruby.so.3.3(rb_iseq_new_with_opt+0x14d) [0x7fa7891815bd] /tmp/ruby-build.20240530181640.5619.rzPMtg/ruby-3.3.2/iseq.c:946
lib/libruby.so.3.3(new_child_iseq+0xa7) [0x7fa78908ee87] /tmp/ruby-build.20240530181640.5619.rzPMtg/ruby-3.3.2/compile.c:1494
lib/libruby.so.3.3(compile_iter+0x4c) [0x7fa7890a6f4c] /tmp/ruby-build.20240530181640.5619.rzPMtg/ruby-3.3.2/compile.c:7719
lib/libruby.so.3.3(iseq_compile_each0) /tmp/ruby-build.20240530181640.5619.rzPMtg/ruby-3.3.2/compile.c:9808
lib/libruby.so.3.3(compile_block+0x1c) [0x7fa7890a654c] /tmp/ruby-build.20240530181640.5619.rzPMtg/ruby-3.3.2/compile.c:4348
lib/libruby.so.3.3(iseq_compile_each0) /tmp/ruby-build.20240530181640.5619.rzPMtg/ruby-3.3.2/compile.c:9787
lib/libruby.so.3.3(rb_iseq_compile_node+0x73e) [0x7fa7890b144e] /tmp/ruby-build.20240530181640.5619.rzPMtg/ruby-3.3.2/compile.c:938
lib/libruby.so.3.3(rb_iseq_new_with_opt+0x14d) [0x7fa7891815bd] /tmp/ruby-build.20240530181640.5619.rzPMtg/ruby-3.3.2/iseq.c:946
lib/libruby.so.3.3(rb_iseq_new_main+0x71) [0x7fa7891819b1] /tmp/ruby-build.20240530181640.5619.rzPMtg/ruby-3.3.2/iseq.c:885
lib/libruby.so.3.3(process_options+0x164c) [0x7fa78926232c] /tmp/ruby-build.20240530181640.5619.rzPMtg/ruby-3.3.2/ruby.c:2441
lib/libruby.so.3.3(ruby_process_options+0x145) [0x7fa789262985] /tmp/ruby-build.20240530181640.5619.rzPMtg/ruby-3.3.2/ruby.c:3014
lib/libruby.so.3.3(ruby_options+0xcd) [0x7fa78911dc5d] /tmp/ruby-build.20240530181640.5619.rzPMtg/ruby-3.3.2/eval.c:121
bin/ruby(rb_main+0x19) [0x55b0072da10a] ./main.c:39
bin/ruby(main) ./main.c:58
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_call_main+0x7a) [0x7fa788d60c8a] ../sysdeps/nptl/libc_start_call_main.h:58
/lib/x86_64-linux-gnu/libc.so.6(call_init+0x0) [0x7fa788d60d45] ../csu/libc-start.c:360
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main_impl) ../csu/libc-start.c:347
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main) (null):0
[0x55b0072da151]

-- Other runtime information -----------------------------------------------

* Loaded script: in.rb

* Loaded features:

    0 enumerator.so
    1 thread.rb
    2 fiber.so
    3 rational.so
    4 complex.so
    5 ruby2_keywords.rb
    6 lib/ruby/3.3.0/x86_64-linux/enc/encdb.so
    7 lib/ruby/3.3.0/x86_64-linux/enc/trans/transdb.so
    8 lib/ruby/3.3.0/x86_64-linux/rbconfig.rb
    9 lib/ruby/3.3.0/rubygems/compatibility.rb
   10 lib/ruby/3.3.0/rubygems/defaults.rb
   11 lib/ruby/3.3.0/rubygems/deprecate.rb
   12 lib/ruby/3.3.0/rubygems/errors.rb
   13 lib/ruby/3.3.0/rubygems/unknown_command_spell_checker.rb
   14 lib/ruby/3.3.0/rubygems/exceptions.rb
   15 lib/ruby/3.3.0/rubygems/basic_specification.rb
   16 lib/ruby/3.3.0/rubygems/stub_specification.rb
   17 lib/ruby/3.3.0/rubygems/platform.rb
   18 lib/ruby/3.3.0/rubygems/util/list.rb
   19 lib/ruby/3.3.0/rubygems/version.rb
   20 lib/ruby/3.3.0/rubygems/requirement.rb
   21 lib/ruby/3.3.0/rubygems/specification.rb
   22 lib/ruby/3.3.0/rubygems/util.rb
   23 lib/ruby/3.3.0/rubygems/dependency.rb
   24 lib/ruby/3.3.0/rubygems/core_ext/kernel_gem.rb
   25 lib/ruby/3.3.0/x86_64-linux/monitor.so
   26 lib/ruby/3.3.0/monitor.rb
   27 lib/ruby/3.3.0/rubygems.rb
   28 lib/ruby/3.3.0/bundled_gems.rb
   29 lib/ruby/3.3.0/rubygems/path_support.rb
   30 lib/ruby/3.3.0/error_highlight/version.rb
   31 lib/ruby/3.3.0/error_highlight/base.rb
   32 lib/ruby/3.3.0/error_highlight/formatter.rb
   33 lib/ruby/3.3.0/error_highlight/core_ext.rb
   34 lib/ruby/3.3.0/error_highlight.rb
   35 lib/ruby/3.3.0/did_you_mean/version.rb
   36 lib/ruby/3.3.0/did_you_mean/core_ext/name_error.rb
   37 lib/ruby/3.3.0/did_you_mean/levenshtein.rb
   38 lib/ruby/3.3.0/did_you_mean/jaro_winkler.rb
   39 lib/ruby/3.3.0/did_you_mean/spell_checker.rb
   40 lib/ruby/3.3.0/did_you_mean/spell_checkers/name_error_checkers/class_name_checker.rb
   41 lib/ruby/3.3.0/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb
   42 lib/ruby/3.3.0/did_you_mean/spell_checkers/name_error_checkers.rb
   43 lib/ruby/3.3.0/did_you_mean/spell_checkers/method_name_checker.rb
   44 lib/ruby/3.3.0/did_you_mean/spell_checkers/key_error_checker.rb
   45 lib/ruby/3.3.0/did_you_mean/spell_checkers/null_checker.rb
   46 lib/ruby/3.3.0/did_you_mean/tree_spell_checker.rb
   47 lib/ruby/3.3.0/did_you_mean/spell_checkers/require_path_checker.rb
   48 lib/ruby/3.3.0/did_you_mean/spell_checkers/pattern_key_name_checker.rb
   49 lib/ruby/3.3.0/did_you_mean/formatter.rb
   50 lib/ruby/3.3.0/did_you_mean.rb
   51 lib/ruby/3.3.0/syntax_suggest/core_ext.rb

* Process memory map:

55b0072d9000-55b0072da000 r--p 00000000 09:7f 42870666                   bin/ruby
55b0072da000-55b0072db000 r-xp 00001000 09:7f 42870666                   bin/ruby
55b0072db000-55b0072dc000 r--p 00002000 09:7f 42870666                   bin/ruby
55b0072dc000-55b0072dd000 r--p 00002000 09:7f 42870666                   bin/ruby
55b0072dd000-55b0072de000 rw-p 00003000 09:7f 42870666                   bin/ruby
55b007f9f000-55b008772000 rw-p 00000000 00:00 0                          [heap]
7fa76a627000-7fa76a800000 r--s 00000000 09:00 285418                     /usr/lib/x86_64-linux-gnu/libc.so.6
7fa76a800000-7fa76aa80000 rw-p 00000000 00:00 0 
7fa76ac00000-7fa76b109000 rw-p 00000000 00:00 0 
7fa76b200000-7fa76bee5000 rw-p 00000000 00:00 0 
7fa76c000000-7fa76d1d8000 r--s 00000000 09:7f 42870668                   lib/libruby.so.3.3.2
7fa76d200000-7fa76d201000 ---p 00000000 00:00 0 
7fa76d201000-7fa76d2a2000 rw-p 00000000 00:00 0 
7fa76d2a2000-7fa76d2a3000 ---p 00000000 00:00 0 
7fa76d2a3000-7fa76d344000 rw-p 00000000 00:00 0 
7fa76d344000-7fa76d345000 ---p 00000000 00:00 0 
7fa76d345000-7fa76d3e6000 rw-p 00000000 00:00 0 
7fa76d3e6000-7fa76d3e7000 ---p 00000000 00:00 0 
7fa76d3e7000-7fa76d488000 rw-p 00000000 00:00 0 
7fa76d488000-7fa76d489000 ---p 00000000 00:00 0 
7fa76d489000-7fa76d52a000 rw-p 00000000 00:00 0 
7fa76d52a000-7fa76d52b000 ---p 00000000 00:00 0 
7fa76d52b000-7fa76d5cc000 rw-p 00000000 00:00 0 
7fa76d5cc000-7fa76d5cd000 ---p 00000000 00:00 0 
7fa76d5cd000-7fa76d66e000 rw-p 00000000 00:00 0 
7fa76d66e000-7fa76d66f000 ---p 00000000 00:00 0 
7fa76d66f000-7fa76d710000 rw-p 00000000 00:00 0 
7fa76d710000-7fa76d711000 ---p 00000000 00:00 0 
7fa76d711000-7fa76d7b2000 rw-p 00000000 00:00 0 
7fa76d7b2000-7fa76d7b3000 ---p 00000000 00:00 0 
7fa76d7b3000-7fa76d854000 rw-p 00000000 00:00 0 
7fa76d854000-7fa76d855000 ---p 00000000 00:00 0 
7fa76d855000-7fa76d8f6000 rw-p 00000000 00:00 0 
7fa76d8f6000-7fa76d8f7000 ---p 00000000 00:00 0 
7fa76d8f7000-7fa76d998000 rw-p 00000000 00:00 0 
7fa76d998000-7fa76d999000 ---p 00000000 00:00 0 
7fa76d999000-7fa76da3a000 rw-p 00000000 00:00 0 
7fa76da3a000-7fa76da3b000 ---p 00000000 00:00 0 
7fa76da3b000-7fa76dadc000 rw-p 00000000 00:00 0 
7fa76dadc000-7fa76dadd000 ---p 00000000 00:00 0 
7fa76dadd000-7fa76db7e000 rw-p 00000000 00:00 0 
7fa76db7e000-7fa76db7f000 ---p 00000000 00:00 0 
7fa76db7f000-7fa76dc20000 rw-p 00000000 00:00 0 
7fa76dc20000-7fa76dc21000 ---p 00000000 00:00 0 
7fa76dc21000-7fa76dcc2000 rw-p 00000000 00:00 0 
7fa76dcc2000-7fa76dcc3000 ---p 00000000 00:00 0 
7fa76dcc3000-7fa76dd64000 rw-p 00000000 00:00 0 
7fa76dd64000-7fa76dd65000 ---p 00000000 00:00 0 
7fa76dd65000-7fa76de06000 rw-p 00000000 00:00 0 
7fa76de06000-7fa76de07000 ---p 00000000 00:00 0 
7fa76de07000-7fa76dea8000 rw-p 00000000 00:00 0 
7fa76dea8000-7fa76dea9000 ---p 00000000 00:00 0 
7fa76dea9000-7fa76df4a000 rw-p 00000000 00:00 0 
7fa76df4a000-7fa76df4b000 ---p 00000000 00:00 0 
7fa76df4b000-7fa76dfec000 rw-p 00000000 00:00 0 
7fa76dfec000-7fa76dfed000 ---p 00000000 00:00 0 
7fa76dfed000-7fa76e08e000 rw-p 00000000 00:00 0 
7fa76e08e000-7fa76e08f000 ---p 00000000 00:00 0 
7fa76e08f000-7fa76e130000 rw-p 00000000 00:00 0 
7fa76e130000-7fa76e131000 ---p 00000000 00:00 0 
7fa76e131000-7fa76e1d2000 rw-p 00000000 00:00 0 
7fa76e1d2000-7fa76e1d3000 ---p 00000000 00:00 0 
7fa76e1d3000-7fa76e274000 rw-p 00000000 00:00 0 
7fa76e274000-7fa76e275000 ---p 00000000 00:00 0 
7fa76e275000-7fa76e316000 rw-p 00000000 00:00 0 
7fa76e316000-7fa76e317000 ---p 00000000 00:00 0 
7fa76e317000-7fa76e3b8000 rw-p 00000000 00:00 0 
7fa76e3b8000-7fa76e3b9000 ---p 00000000 00:00 0 
7fa76e3b9000-7fa76e45a000 rw-p 00000000 00:00 0 
7fa76e45a000-7fa76e45b000 ---p 00000000 00:00 0 
7fa76e45b000-7fa76e4fc000 rw-p 00000000 00:00 0 
7fa76e4fc000-7fa76e4fd000 ---p 00000000 00:00 0 
7fa76e4fd000-7fa76e59e000 rw-p 00000000 00:00 0 
7fa76e59e000-7fa76e59f000 ---p 00000000 00:00 0 
7fa76e59f000-7fa76e640000 rw-p 00000000 00:00 0 
7fa76e800000-7fa76e801000 ---p 00000000 00:00 0 
7fa76e801000-7fa76f001000 rw-p 00000000 00:00 0 
7fa76f0e0000-7fa76f0f0000 rw-p 00000000 00:00 0 
7fa76f200000-7fa788600000 rw-p 00000000 00:00 0 
7fa788610000-7fa788620000 rw-p 00000000 00:00 0 
7fa788629000-7fa788660000 r--s 00000000 09:7f 42870666                   bin/ruby
7fa788660000-7fa7886c0000 rw-p 00000000 00:00 0 
7fa7886d0000-7fa788790000 rw-p 00000000 00:00 0 
7fa78879f000-7fa788800000 rw-p 00000000 00:00 0 
7fa788800000-7fa788b8b000 r--p 00000000 09:00 293187                     /usr/lib/locale/locale-archive
7fa788ba0000-7fa788ce1000 rw-p 00000000 00:00 0 
7fa788ce1000-7fa788d39000 r--p 00000000 09:00 839275                     /usr/lib/locale/C.utf8/LC_CTYPE
7fa788d39000-7fa788d5f000 r--p 00000000 09:00 285418                     /usr/lib/x86_64-linux-gnu/libc.so.6
7fa788d5f000-7fa788eb6000 r-xp 00026000 09:00 285418                     /usr/lib/x86_64-linux-gnu/libc.so.6
7fa788eb6000-7fa788f0b000 r--p 0017d000 09:00 285418                     /usr/lib/x86_64-linux-gnu/libc.so.6
7fa788f0b000-7fa788f0f000 r--p 001d1000 09:00 285418                     /usr/lib/x86_64-linux-gnu/libc.so.6
7fa788f0f000-7fa788f11000 rw-p 001d5000 09:00 285418                     /usr/lib/x86_64-linux-gnu/libc.so.6
7fa788f11000-7fa788f1e000 rw-p 00000000 00:00 0 
7fa788f1e000-7fa788f2e000 r--p 00000000 09:00 285704                     /usr/lib/x86_64-linux-gnu/libm.so.6
7fa788f2e000-7fa788fa4000 r-xp 00010000 09:00 285704                     /usr/lib/x86_64-linux-gnu/libm.so.6
7fa788fa4000-7fa788ffe000 r--p 00086000 09:00 285704                     /usr/lib/x86_64-linux-gnu/libm.so.6
7fa788ffe000-7fa788fff000 r--p 000df000 09:00 285704                     /usr/lib/x86_64-linux-gnu/libm.so.6
7fa788fff000-7fa789000000 rw-p 000e0000 09:00 285704                     /usr/lib/x86_64-linux-gnu/libm.so.6
7fa789000000-7fa78904a000 r--p 00000000 09:7f 42870668                   lib/libruby.so.3.3.2
7fa78904a000-7fa78943c000 r-xp 0004a000 09:7f 42870668                   lib/libruby.so.3.3.2
7fa78943c000-7fa7895c3000 r--p 0043c000 09:7f 42870668                   lib/libruby.so.3.3.2
7fa7895c3000-7fa7895d9000 r--p 005c3000 09:7f 42870668                   lib/libruby.so.3.3.2
7fa7895d9000-7fa7895dd000 rw-p 005d9000 09:7f 42870668                   lib/libruby.so.3.3.2
7fa7895dd000-7fa7895f2000 rw-p 00000000 00:00 0 
7fa789610000-7fa789630000 rw-p 00000000 00:00 0 
7fa78963f000-7fa789641000 rw-p 00000000 00:00 0 
7fa789641000-7fa789645000 r--p 00000000 09:00 285622                     /usr/lib/x86_64-linux-gnu/libgcc_s.so.1
7fa789645000-7fa789668000 r-xp 00004000 09:00 285622                     /usr/lib/x86_64-linux-gnu/libgcc_s.so.1
7fa789668000-7fa78966c000 r--p 00027000 09:00 285622                     /usr/lib/x86_64-linux-gnu/libgcc_s.so.1
7fa78966c000-7fa78966d000 r--p 0002b000 09:00 285622                     /usr/lib/x86_64-linux-gnu/libgcc_s.so.1
7fa78966d000-7fa78966e000 rw-p 0002c000 09:00 285622                     /usr/lib/x86_64-linux-gnu/libgcc_s.so.1
7fa78966e000-7fa789670000 rw-p 00000000 00:00 0 
7fa789670000-7fa789672000 r--p 00000000 09:00 285652                     /usr/lib/x86_64-linux-gnu/libcrypt.so.1.1.0
7fa789672000-7fa789688000 r-xp 00002000 09:00 285652                     /usr/lib/x86_64-linux-gnu/libcrypt.so.1.1.0
7fa789688000-7fa7896a2000 r--p 00018000 09:00 285652                     /usr/lib/x86_64-linux-gnu/libcrypt.so.1.1.0
7fa7896a2000-7fa7896a3000 r--p 00031000 09:00 285652                     /usr/lib/x86_64-linux-gnu/libcrypt.so.1.1.0
7fa7896a3000-7fa7896a4000 rw-p 00032000 09:00 285652                     /usr/lib/x86_64-linux-gnu/libcrypt.so.1.1.0
7fa7896a4000-7fa7896ac000 rw-p 00000000 00:00 0 
7fa7896ac000-7fa7896b8000 r--p 00000000 09:00 286181                     /usr/lib/x86_64-linux-gnu/libgmp.so.10.5.0
7fa7896b8000-7fa78971b000 r-xp 0000c000 09:00 286181                     /usr/lib/x86_64-linux-gnu/libgmp.so.10.5.0
7fa78971b000-7fa789732000 r--p 0006f000 09:00 286181                     /usr/lib/x86_64-linux-gnu/libgmp.so.10.5.0
7fa789732000-7fa789733000 r--p 00086000 09:00 286181                     /usr/lib/x86_64-linux-gnu/libgmp.so.10.5.0
7fa789733000-7fa789734000 rw-p 00087000 09:00 286181                     /usr/lib/x86_64-linux-gnu/libgmp.so.10.5.0
7fa789734000-7fa789737000 r--p 00000000 09:00 285895                     /usr/lib/x86_64-linux-gnu/libz.so.1.3.1
7fa789737000-7fa78974a000 r-xp 00003000 09:00 285895                     /usr/lib/x86_64-linux-gnu/libz.so.1.3.1
7fa78974a000-7fa789751000 r--p 00016000 09:00 285895                     /usr/lib/x86_64-linux-gnu/libz.so.1.3.1
7fa789751000-7fa789752000 r--p 0001c000 09:00 285895                     /usr/lib/x86_64-linux-gnu/libz.so.1.3.1
7fa789752000-7fa789753000 rw-p 0001d000 09:00 285895                     /usr/lib/x86_64-linux-gnu/libz.so.1.3.1
7fa789756000-7fa789757000 r--p 00000000 09:7f 42870755                   lib/ruby/3.3.0/x86_64-linux/monitor.so
7fa789757000-7fa789758000 r-xp 00001000 09:7f 42870755                   lib/ruby/3.3.0/x86_64-linux/monitor.so
7fa789758000-7fa789759000 r--p 00002000 09:7f 42870755                   lib/ruby/3.3.0/x86_64-linux/monitor.so
7fa789759000-7fa78975a000 r--p 00002000 09:7f 42870755                   lib/ruby/3.3.0/x86_64-linux/monitor.so
7fa78975a000-7fa78975b000 rw-p 00003000 09:7f 42870755                   lib/ruby/3.3.0/x86_64-linux/monitor.so
7fa78975b000-7fa78975c000 r--p 00000000 09:7f 42870679                   lib/ruby/3.3.0/x86_64-linux/enc/trans/transdb.so
7fa78975c000-7fa78975d000 r-xp 00001000 09:7f 42870679                   lib/ruby/3.3.0/x86_64-linux/enc/trans/transdb.so
7fa78975d000-7fa78975e000 r--p 00002000 09:7f 42870679                   lib/ruby/3.3.0/x86_64-linux/enc/trans/transdb.so
7fa78975e000-7fa78975f000 r--p 00002000 09:7f 42870679                   lib/ruby/3.3.0/x86_64-linux/enc/trans/transdb.so
7fa78975f000-7fa789760000 rw-p 00003000 09:7f 42870679                   lib/ruby/3.3.0/x86_64-linux/enc/trans/transdb.so
7fa789760000-7fa789761000 r--p 00000000 09:7f 42870702                   lib/ruby/3.3.0/x86_64-linux/enc/encdb.so
7fa789761000-7fa789762000 r-xp 00001000 09:7f 42870702                   lib/ruby/3.3.0/x86_64-linux/enc/encdb.so
7fa789762000-7fa789763000 r--p 00002000 09:7f 42870702                   lib/ruby/3.3.0/x86_64-linux/enc/encdb.so
7fa789763000-7fa789764000 r--p 00002000 09:7f 42870702                   lib/ruby/3.3.0/x86_64-linux/enc/encdb.so
7fa789764000-7fa789765000 rw-p 00003000 09:7f 42870702                   lib/ruby/3.3.0/x86_64-linux/enc/encdb.so
7fa789765000-7fa78976c000 r--s 00000000 09:00 312670                     /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache
7fa78976c000-7fa78976e000 rw-p 00000000 00:00 0 
7fa78976e000-7fa78976f000 r--p 00000000 09:00 285229                     /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
7fa78976f000-7fa789794000 r-xp 00001000 09:00 285229                     /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
7fa789794000-7fa78979e000 r--p 00026000 09:00 285229                     /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
7fa78979e000-7fa7897a0000 r--p 00030000 09:00 285229                     /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
7fa7897a0000-7fa7897a2000 rw-p 00032000 09:00 285229                     /usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
7fffeaffc000-7fffeb7fb000 rw-p 00000000 00:00 0                          [stack]
7fffeb83a000-7fffeb83e000 r--p 00000000 00:00 0                          [vvar]
7fffeb83e000-7fffeb840000 r-xp 00000000 00:00 0                          [vdso]

Related issues 1 (0 open1 closed)

Is duplicate of Ruby master - Bug #20468: Segfault on safe navigation in for targetClosedActions

Updated by herwin (Herwin W) 5 months ago

I tried a few more Ruby versions. JRuby 9.4.7.0 works, but it results in an error when foo = nil. MRuby 3.3.0 and TruffleRuby 24.0.1 both work fine with this case and the foo = nil case.

Updated by kddnewton (Kevin Newton) 5 months ago

I believe this has already been fixed in https://bugs.ruby-lang.org/issues/20468. Can you try HEAD?

Actions #3

Updated by nobu (Nobuyoshi Nakada) 5 months ago

  • Is duplicate of Bug #20468: Segfault on safe navigation in for target added
Actions #4

Updated by nobu (Nobuyoshi Nakada) 5 months ago

  • Status changed from Open to Feedback

Updated by herwin (Herwin W) 5 months ago

Just tried it with the latest git version (ruby 3.4.0dev (2024-06-07T04:38:11Z master a279463d0e) [x86_64-linux]), it is fixed indeed. I tried the foo = nil part as well, and that works too. I guess this one can be closed.

Actions #6

Updated by mame (Yusuke Endoh) 5 months ago

  • Status changed from Feedback to Closed
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0