Project

General

Profile

Actions

Bug #3286

closed

segfault in method_missing -> method -> method_missing recursive loop

Added by dominikh (Dominik Honnef) over 14 years ago. Updated over 13 years ago.

Status:
Closed
Assignee:
-
Target version:
ruby -v:
ruby 1.9.1p378 (2010-01-10 revision 26273) [i686-linux]
Backport:
[ruby-core:30207]

Description

=begin
the following code segfaults in 1.9.1 (and ruby-head) but works in 1.8.x:

class Foo
def bar
unknown_variable
end

def method_missing(m, *args)
bar
end
end

Thread.new do
begin
Foo.new.meow
rescue SystemStackError
p "raised"
exit
end
end

while true
sleep 1
end

ruby -v /tmp/fail.rb
ruby 1.8.6 (2010-02-05 patchlevel 399) [i686-linux]
"raised"

ruby -v /tmp/fail.rb
ruby 1.8.7 (2010-01-10 patchlevel 249) [i686-linux]
"raised"

ruby -v /tmp/fail.rb
ruby 1.9.1p378 (2010-01-10 revision 26273) [i686-linux]
zsh: segmentation fault ruby -v /tmp/fail.rb

ruby -v /tmp/fail.rb
ruby 1.9.3dev (2010-05-13 trunk 27786) [i686-linux]
zsh: segmentation fault ruby -v /tmp/fail.rb
=end


Related issues 1 (0 open1 closed)

Is duplicate of Ruby master - Bug #1813: Threading seg fault (1.9.1-p129 Linux/Mac)Closedkosaki (Motohiro KOSAKI)07/24/2009Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0