mirror of https://github.com/python/cpython
Make PyTraceBack_Here use the current thread, not the
frame's thread state. Fixes #1579370. Will backport.
This commit is contained in:
parent
6ed1965308
commit
6c5c502b91
|
@ -12,6 +12,9 @@ What's New in Python 2.6 alpha 1?
|
||||||
Core and builtins
|
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
|
- patch #1630975: Fix crash when replacing sys.stdout in sitecustomize.py
|
||||||
|
|
||||||
- Patch #1507247: tarfile.py: use current umask for intermediate
|
- Patch #1507247: tarfile.py: use current umask for intermediate
|
||||||
|
|
|
@ -113,7 +113,7 @@ newtracebackobject(PyTracebackObject *next, PyFrameObject *frame)
|
||||||
int
|
int
|
||||||
PyTraceBack_Here(PyFrameObject *frame)
|
PyTraceBack_Here(PyFrameObject *frame)
|
||||||
{
|
{
|
||||||
PyThreadState *tstate = frame->f_tstate;
|
PyThreadState *tstate = PyThreadState_GET();
|
||||||
PyTracebackObject *oldtb = (PyTracebackObject *) tstate->curexc_traceback;
|
PyTracebackObject *oldtb = (PyTracebackObject *) tstate->curexc_traceback;
|
||||||
PyTracebackObject *tb = newtracebackobject(oldtb, frame);
|
PyTracebackObject *tb = newtracebackobject(oldtb, frame);
|
||||||
if (tb == NULL)
|
if (tb == NULL)
|
||||||
|
|
Loading…
Reference in New Issue