This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author amaury.forgeotdarc
Recipients amaury.forgeotdarc, pitrou, yury
Date 2009-05-15.17:47:38
SpamBayes Score 3.8857806e-16
Marked as misclassified No
Message-id <1242409661.22.0.734534889016.issue6028@psf.upfronthosting.co.za>
In-reply-to
Content
Hmm, the interpreter should not crash so easily with pyre Python code.
(The same code correctly raises RuntimeException wich python 2.x)
The issue should be corrected IMO.

The exact behavior seem to depend on where the recursion limit is detected:

- If it is detected at the beginning of the function (at the start of
PyEval_EvalFrameEx) or before the "try" statement, the exception is
correctly propagated and displayed. This case always happens with 2.x,
and you get the same on 3.0 if you add for example str([[[[[[[[]]]]]]]])
at the beginning of the function.

- The crash occurs when the recursion limit is detected while
PyEval_EvalFrameEx calls PyErr_NormalizeException() (in the "why ==
WHY_EXCEPTION" block). This does not change the control flow: the
original exception is simply replaced by the RuntimeError, and nested
calls continue 50 more frames.

Here is a tentative patch.
History
Date User Action Args
2009-05-15 17:47:41amaury.forgeotdarcsetrecipients: + amaury.forgeotdarc, pitrou, yury
2009-05-15 17:47:41amaury.forgeotdarcsetmessageid: <1242409661.22.0.734534889016.issue6028@psf.upfronthosting.co.za>
2009-05-15 17:47:40amaury.forgeotdarclinkissue6028 messages
2009-05-15 17:47:39amaury.forgeotdarccreate