]> granicus.if.org Git - python/commit
SF bug #483469: crash on unbounded recursion in __del__.
authorTim Peters <tim.peters@gmail.com>
Tue, 27 Nov 2001 23:29:29 +0000 (23:29 +0000)
committerTim Peters <tim.peters@gmail.com>
Tue, 27 Nov 2001 23:29:29 +0000 (23:29 +0000)
commitb13680bf034ee2522a9252127065100e5ca1c13f
tree6411f4100f0e187d784d29e89351b8f6d693b64b
parent6d20b43a4e3255e4b4fe4468861abf72166d9acf
SF bug #483469:  crash on unbounded recursion in __del__.
PyEval_EvalCodeEx():  increment tstate->recursion_depth around the
decref of the frame, because the C stack for this call is still in
use and the decref can lead to __del__ methods getting called.

While this gives tstate->recursion_depth a value proportional to the
depth of the C stack (instead of a small constant no matter how
deeply __del__s recurse), it's not enough to stop the reported crash
when using the default recursion limit on Windows.

Bugfix candidate.
Python/ceval.c