This script crashes my builds of Ruby versions 1.8.6 and 1.6.8
on x86 Gentoo Linux compile with gcc 4.1.2  (no optimization)

#!/usr/bin/env ruby
#Crashes 1.8.6 & 1.6.8 as of Dec 5th, 2007
#submitted by brent / mbari.org

def nestedThreadBug
  inner = nil
  outer = Thread.new(Thread.current) do |passedThread|
  $c4 = callcc {|c| c}
    inner = Thread.new passedThread do
    end
  end
  yield(outer)
  outer.value
  inner
end

loop {
  inner = nestedThreadBug do |thread|
    thread.value
  end
  inner.join
}


# I'm testing a patch to fix this
# I'll be posting it in the next couple days.
# In the meantime, it would be great of some of you could verify the
# crash in your environments.

# I'm particularly interested in whether Ruby 1.9 crashes as I don't have
# a recent version of that to test.

-- 
View this message in context: http://www.nabble.com/-BUG--Continuations-on-dead-threads-crash-1.8.6-and-1.6.8-tf4954845.html#a14188764
Sent from the ruby-core mailing list archive at Nabble.com.