Skip to content

Commit 81f9b44

Browse files
committed
Do not close callable stackref
1 parent bbf1c9d commit 81f9b44

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

Python/bytecodes.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5361,8 +5361,10 @@ dummy_func(
53615361
tier2 op(_SWAP_CALL_ONE_LOAD_CONST_INLINE_BORROW, (ptr/4, callable, null, arg -- value, a)) {
53625362
PyStackRef_CLOSE(arg);
53635363
(void)null; // Silence compiler warnings about unused variables
5364+
(void)callable;
53645365
DEAD(null);
5365-
PyStackRef_CLOSE(callable);
5366+
DEAD(callable);
5367+
assert(_Py_IsImmortal(PyStackRef_AsPyObjectBorrow(callable)));
53665368
value = PyStackRef_FromPyObjectBorrow(ptr);
53675369
a = arg;
53685370
}

Python/executor_cases.c.h

Lines changed: 4 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)