diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2007-01-23 21:11:58 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2007-01-23 21:11:58 (GMT) |
commit | 601d03a5be6a6952ecb57750f0365d6ef2abd4eb (patch) | |
tree | de7a636892d4b0cf10d818665498b23184d30ae4 | |
parent | e471317a084512d558fd3bfd84592a6a7126cdee (diff) | |
download | cpython-601d03a5be6a6952ecb57750f0365d6ef2abd4eb.zip cpython-601d03a5be6a6952ecb57750f0365d6ef2abd4eb.tar.gz cpython-601d03a5be6a6952ecb57750f0365d6ef2abd4eb.tar.bz2 |
Make PyTraceBack_Here use the current thread, not the
frame's thread state. Fixes #1579370.
-rw-r--r-- | Misc/NEWS | 3 | ||||
-rw-r--r-- | Python/traceback.c | 2 |
2 files changed, 4 insertions, 1 deletions
@@ -12,6 +12,9 @@ What's New in Python 2.5.1c1? Core and builtins ----------------- +- Bug #1579370: Make PyTraceBack_Here use the current thread, not the + frame's thread state. + - patch #1630975: Fix crash when replacing sys.stdout in sitecustomize.py - Bug #1637022: Prefix AST symbols with _Py_. diff --git a/Python/traceback.c b/Python/traceback.c index cfbd833..4ddee2c 100644 --- a/Python/traceback.c +++ b/Python/traceback.c @@ -113,7 +113,7 @@ newtracebackobject(PyTracebackObject *next, PyFrameObject *frame) int PyTraceBack_Here(PyFrameObject *frame) { - PyThreadState *tstate = frame->f_tstate; + PyThreadState *tstate = PyThreadState_GET(); PyTracebackObject *oldtb = (PyTracebackObject *) tstate->curexc_traceback; PyTracebackObject *tb = newtracebackobject(oldtb, frame); if (tb == NULL) |