Project

General

Profile

Actions

Bug #2611

closed

Hang while executing END blocks with redirected stderr

Added by tmat (Tomas Matousek) over 15 years ago. Updated about 14 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-mswin32]
Backport:
[ruby-core:27608]

Description

=begin
The following code hangs with CPU on 100% at a random point during execution of END blocks.

class C
def write(x)
puts "[#{x}]"
end
end

$stderr = C.new

END {
raise 'e1'
}
END {
puts 'e2'
}
END {
raise 'e3'
}
END {
puts 'e4'
}
END {
raise 'e5'
}

output:

ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-mswin32]
[END_exceptions.rb:22:in block in <main>'] [: ] [e5] [ (] [RuntimeError] [) ] e4 [END_exceptions.rb:16:in block in ']
[: ]
[e3]
[ (]
[RuntimeError]


Wrks fine in 1.8.6.
=end


Files

err_print.patch (561 Bytes) err_print.patch wanabe (_ wanabe), 01/28/2010 07:19 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0