Skip to content

Commit 87f7c44

Browse files
Merge pull request #11 from jamesclement1776/codex/fix-undefined-references-in-build-5dksqb
Fix tracing guard for unwind fast path
2 parents b2ffe6e + 6bf2ba6 commit 87f7c44

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Python/ceval.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ _PyEval_NoToolsForUnwind(PyThreadState *tstate)
6262
* unwinding. In that situation we can skip some of the normal unwinding
6363
* machinery.
6464
*/
65+
if (tstate->tracing) {
66+
return false;
67+
}
68+
if (tstate->c_profilefunc || tstate->c_tracefunc) {
69+
return false;
70+
}
71+
return tstate->interp->monitors.tools[PY_MONITORING_EVENT_PY_UNWIND] == 0;
6572
return !tstate->cframe->use_tracing;
6673
}
6774

0 commit comments

Comments
 (0)