Issue #22535 has been updated by jhawthorn (John Hawthorn). Backport changed from 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN to 3.3: DONTNEED, 3.4: REQUIRED, 4.0: REQUIRED 4.0: https://github.com/ruby/ruby/pull/19848 3.4: https://github.com/ruby/ruby/pull/19849 ---------------------------------------- Bug #22535: Release mode segfault due to half-initialized error in singleton_method https://bugs.ruby-lang.org/issues/22535#change-119874 * Author: tekknolagi (Maxwell Bernstein) * Status: Closed * Backport: 3.3: DONTNEED, 3.4: REQUIRED, 4.0: REQUIRED ---------------------------------------- This causes a segfault seemingly only in release mode: name = "never_interned_#{rand(10**12)}" begin Object.new.singleton_method(name) rescue NameError => e STDERR.puts "rescued #{e.class}; e.name.class = #{e.name.class}" STDERR.puts e.message # segfaults here (rb_sym_to_s on ID2SYM(0)) end -- https://bugs.ruby-lang.org/