Bug #2493: double free bug
http://redmine.ruby-lang.org/issues/show/2493

Author: Barry Boes
Status: Open, Priority: Normal
Category: core
ruby -v: ruby 1.8.7 (2009-06-12 patchlevel 174) [x86_64-freebsd8.0]

mixing threads and forks results in double free crashes.  Unfortunately I haven't been able to duplicate with less than 500K lines of code.  

The original allocation happens here :
  rb_thread_start_0
  blk_copy_prev
  frame_dup


I've attached a patch which fixes the problem for me, but I'm not familiar enough with
the undocumented ruby internals to be sure that it won't create a memory leak by not freeing
some things that should be.  This patch needs expert review before accepting.

Thanks,
Barry


----------------------------------------
http://redmine.ruby-lang.org