Project

General

Profile

Bug #13596

Updated by mjones (Morgan Jones) almost 7 years ago

This minimal testcase will crash most ruby versions with a SIGSEGV (though it's likely that other constructions could trigger the same behavior). Effectively, after the first SystemStackError that is caught from eval, a subsequent stack overflow will crash ruby rather than triggering another SystemStackError. behavior): 

 Failing testcase: 

 ~~~ 
 ruby -e "code = '+1' * 100000; 2.times {begin; eval code; eval(code); rescue SystemStackError => e; p e; end}" 
 ~~~ 

 Succeeding testcase: 

 ~~~ 
 ruby -e "def x; x; end; 2.times {begin; x; rescue SystemStackError => e; p e; SystemStackError; end}" 
 ~~~ 

 It seems that the crash is triggered by attempting to access the stack redzone.

Back