diff options
author | Guido van Rossum <guido@python.org> | 2000-03-13 16:01:29 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2000-03-13 16:01:29 (GMT) |
commit | d724b23420f8e9d73a656c941c45b234e08ff9d6 (patch) | |
tree | a87fcb839783274d3d0fee3c9609793189a83d8e /Python | |
parent | 96a45adf808ee9798d0c2637aeed2c895fa8e929 (diff) | |
download | cpython-d724b23420f8e9d73a656c941c45b234e08ff9d6.zip cpython-d724b23420f8e9d73a656c941c45b234e08ff9d6.tar.gz cpython-d724b23420f8e9d73a656c941c45b234e08ff9d6.tar.bz2 |
Christian Tismer's "trashcan" patch:
Added wrapping macros to dictobject.c, listobject.c, tupleobject.c,
frameobject.c, traceback.c that safely prevends core dumps
on stack overflow. Macros and functions in object.c, object.h.
The method is an "elevator destructor" that turns cascading
deletes into tail recursive behavior when some limit is hit.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/traceback.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/traceback.c b/Python/traceback.c index ca77eaa..e03551d 100644 --- a/Python/traceback.c +++ b/Python/traceback.c @@ -68,9 +68,11 @@ static void tb_dealloc(tb) tracebackobject *tb; { + Py_TRASHCAN_SAFE_BEGIN(tb) Py_XDECREF(tb->tb_next); Py_XDECREF(tb->tb_frame); PyMem_DEL(tb); + Py_TRASHCAN_SAFE_END(tb) } #define Tracebacktype PyTraceBack_Type |