Project

General

Profile

Actions

Bug #4925

closed

Infinite recursion allowed in rescue clause

Added by wuputah (Jonathan Dance) almost 13 years ago. Updated over 12 years ago.

Status:
Rejected
Target version:
ruby -v:
ruby 1.9.3dev (2011-06-24 trunk 32222) [i686-linux]
Backport:
[ruby-core:37346]

Description

The issue pertains to the following example:

def a
b
rescue NameError
a
end
a

The type of exception raised and rescued is not relevant; the bug occurs with any exception type.

Expected behavior: A SystemStackError should be raised.

Current behavior: The Ruby process will consume cpu and memory until killed.

This is a regression in 1.9.x; the bug does not occur in 1.8-head. The bug is reproducible on all versions of 1.9 I have tested:

ruby 1.9.2p180 (2011-02-18 revision 30909) [i686-linux]
ruby 1.9.2p274 (2011-06-06 revision 31932) [i686-linux]
ruby 1.9.3dev (2011-06-24 trunk 32222) [i686-linux]

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0