]> granicus.if.org Git - python/commit
Fix for an obscure bug introduced by revs 46806 and 46808, with a test.
authorArmin Rigo <arigo@tunes.org>
Wed, 21 Jun 2006 21:58:50 +0000 (21:58 +0000)
committerArmin Rigo <arigo@tunes.org>
Wed, 21 Jun 2006 21:58:50 +0000 (21:58 +0000)
commit53c1692f6ac592a8c0d5a6f83017019b52625969
treecf3bbc857dcacec8d9f1ac63c14cb05906fc7378
parentf92b9c21edd77356179050549465e58276cad532
Fix for an obscure bug introduced by revs 46806 and 46808, with a test.
The problem of checking too eagerly for recursive calls is the
following: if a RuntimeError is caused by recursion, and if code needs
to normalize it immediately (as in the 2nd test), then
PyErr_NormalizeException() needs a call to the RuntimeError class to
instantiate it, and this hits the recursion limit again...  causing
PyErr_NormalizeException() to never finish.

Moved this particular recursion check to slot_tp_call(), which is not
involved in instantiating built-in exceptions.

Backport candidate.
Lib/test/test_exceptions.py
Objects/abstract.c
Objects/typeobject.c