Skip to content

Commit 756f939

Browse files
committed
Avoid overwritting 'dict', needed for unlock.
This also fixes the case if the dict is replaced with a different one.
1 parent 476058d commit 756f939

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

Python/bytecodes.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2385,8 +2385,7 @@ dummy_func(
23852385
DEOPT_IF(dict == NULL);
23862386
DEOPT_IF(!LOCK_OBJECT(dict));
23872387
#ifdef Py_GIL_DISABLED
2388-
dict = _PyObject_GetManagedDict(owner_o);
2389-
if (dict == NULL) {
2388+
if (dict != _PyObject_GetManagedDict(owner_o)) {
23902389
UNLOCK_OBJECT(dict);
23912390
DEOPT_IF(true);
23922391
}

Python/executor_cases.c.h

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/generated_cases.c.h

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)