Project

General

Profile

Actions

Bug #4140

closed

segfault recursion inside a thread

Added by luis (Luis Lopez) about 14 years ago. Updated over 13 years ago.

Status:
Rejected
Assignee:
-
Target version:
ruby -v:
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux]
Backport:
[ruby-core:33646]

Description

=begin
The code below (thanks to flavorjones from Nokogiri) makes ruby 1.9.2 to segfault. It works with 1.8.7 or without the thread, just raising a SystemStackError (stack level too deep).
You can find the stack trace attached.

DEPTH = 2000

def recurse(offset)
STDERR.puts offset
if offset >= DEPTH
"done"
else
[1].inject("") do |y, child|
recurse(offset+1)
y
end
end
end

th=Thread.new {
puts recurse(0).inspect
}
th.join
=end


Files

stacktrace.txt (152 KB) stacktrace.txt luis (Luis Lopez), 12/09/2010 06:38 PM

Updated by naruse (Yui NARUSE) over 13 years ago

  • Status changed from Open to Rejected

Ruby cannot guarantee SystemStackError to be thrown.

Actions

Also available in: Atom PDF

Like0
Like0