Skip to content

Commit 3248512

Browse files
colesburyFidget-Spinner
authored andcommitted
gh-118926: Spill deferred references to stack in cases generator (#122748)
This automatically spills the results from `_PyStackRef_FromPyObjectNew` to the in-memory stack so that the deferred references are visible to the GC before we make any possibly escaping call. Co-authored-by: Ken Jin <[email protected]>
1 parent f8f7f5c commit 3248512

9 files changed

+173
-60
lines changed

Python/bytecodes.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1424,7 +1424,7 @@ dummy_func(
14241424
"no locals found");
14251425
ERROR_IF(true, error);
14261426
}
1427-
locals = PyStackRef_FromPyObjectNew(l);;
1427+
locals = PyStackRef_FromPyObjectNew(l);
14281428
}
14291429

14301430
inst(LOAD_FROM_DICT_OR_GLOBALS, (mod_or_class_dict -- v)) {

Python/executor_cases.c.h

+17-17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/generated_cases.c.h

+23-17
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)