From a7984d5df2ef915085190f7bbc1f70d881e0980c Mon Sep 17 00:00:00 2001 From: Tian Gao Date: Wed, 11 Oct 2023 23:29:45 -0700 Subject: [PATCH 1/2] Reset eval_breaker to 0 in interpreter_clear --- Python/pystate.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Python/pystate.c b/Python/pystate.c index 2086bd619df912..92cf741f4ca4ed 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -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; } From e9577bdddc7b0522eefd580feeedbc183c888c03 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 06:32:27 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2023-10-12-06-32-25.gh-issue-110752.FYfI0h.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Core and Builtins/2023-10-12-06-32-25.gh-issue-110752.FYfI0h.rst diff --git a/Misc/NEWS.d/next/Core and Builtins/2023-10-12-06-32-25.gh-issue-110752.FYfI0h.rst b/Misc/NEWS.d/next/Core and Builtins/2023-10-12-06-32-25.gh-issue-110752.FYfI0h.rst new file mode 100644 index 00000000000000..fa1a59ec927bb8 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2023-10-12-06-32-25.gh-issue-110752.FYfI0h.rst @@ -0,0 +1 @@ +Reset ``ceval.eval_breaker`` in :func:`interpreter_clear`