Project

General

Profile

Backport #2728

Updated by jeremyevans0 (Jeremy Evans) over 5 years ago

=begin 
  
  As best as I can work out, the conditions to reproduce this crash are: 
  1. A begin/ensure block yields to a block passed by Enumerable (maybe passed by any compiled function?).  
  2. Control is forced to the ensure block from 'break' being called from Enumerable.  
  3. The ensure block contains a call to a dynamically defined method (created using define_method).  
  4. The dynamically defined method runs.  
  5. Instead of returning from the dynamically defined method, ruby segfaults (on windows XP), or bus errors (on OS X).  
 
  Happens on both Windows XP and Mac OS X (10.5.8). Script to reproduce and output are attached. 
 
 =end 
 

Back