Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1718827

Browse filesBrowse files
[3.13] gh-117657: Fix some simple races in instrumentation.c (GH-120118) (#120444)
gh-117657: Fix some simple races in instrumentation.c (GH-120118) * stop the world when setting local events (cherry picked from commit b1b61dc) Co-authored-by: Ken Jin <kenjin@python.org>
1 parent 3067c62 commit 1718827
Copy full SHA for 1718827

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎Python/instrumentation.c

Copy file name to clipboardExpand all lines: Python/instrumentation.c
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1977,7 +1977,7 @@ _PyMonitoring_SetLocalEvents(PyCodeObject *code, int tool_id, _PyMonitoringEvent
19771977
}
19781978

19791979
int res;
1980-
LOCK_CODE(code);
1980+
_PyEval_StopTheWorld(interp);
19811981
if (allocate_instrumentation_data(code)) {
19821982
res = -1;
19831983
goto done;
@@ -1994,7 +1994,7 @@ _PyMonitoring_SetLocalEvents(PyCodeObject *code, int tool_id, _PyMonitoringEvent
19941994
res = force_instrument_lock_held(code, interp);
19951995

19961996
done:
1997-
UNLOCK_CODE();
1997+
_PyEval_StartTheWorld(interp);
19981998
return res;
19991999
}
20002000

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.