gh-110752: Reset ceval.eval_breaker to 0 in interpreter_clear (GH-110753)

This commit is contained in:
Tian Gao 2023-10-12 07:10:21 -07:00 committed by GitHub
parent b6000d2874
commit 1e3460d9fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View file

@ -890,6 +890,10 @@ interpreter_clear(PyInterpreterState *interp, PyThreadState *tstate)
Py_CLEAR(interp->audit_hooks);
// At this time, all the threads should be cleared so we don't need
// atomic operations for eval_breaker
interp->ceval.eval_breaker = 0;
for (int i = 0; i < _PY_MONITORING_UNGROUPED_EVENTS; i++) {
interp->monitors.tools[i] = 0;
}