From: s.wanabe@... Date: 2017-04-09T21:54:37+00:00 Subject: [ruby-core:80627] [Ruby trunk Bug#13412] Infinite recursion with define_method may cause silent SEGV or cfp consistency error Issue #13412 has been updated by wanabe (_ wanabe). > Duplicates Bug #13164: A second `SystemStackError` exception results in `Segmentation fault (core dumped)` added #13164 is very much like this issue, but not quite the same. Because this issue doesn't occur without `define_method`. The followning script works fine, loops infinitely. ``` def foo; foo; end loop do 1.times do 1.times do begin foo rescue Exception nil end end end end ``` And another following script may cause "cfp consistency error" in rare cases. (5% or lower ?) ``` define_method(:foo) { foo } 1.times do 1.times do begin foo rescue Exception nil end end end ``` ---------------------------------------- Bug #13412: Infinite recursion with define_method may cause silent SEGV or cfp consistency error https://bugs.ruby-lang.org/issues/13412#change-64138 * Author: wanabe (_ wanabe) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.5.0dev (2017-04-09 trunk 58286) [x86_64-linux] * Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN ---------------------------------------- The script causes silent (no output [BUG]) SEGV or "cfp consistency error" on my environment. ``` define_method(:foo) { foo } loop do 1.times do 1.times do begin foo rescue Exception nil end end end end ``` I think this is related to #11430 (maybe same). -- https://bugs.ruby-lang.org/ Unsubscribe: