Skip to content

Commit 641289c

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 226330e commit 641289c

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
@@ -2374,8 +2374,7 @@ dummy_func(
23742374
DEOPT_IF(dict == NULL);
23752375
DEOPT_IF(!LOCK_OBJECT(dict));
23762376
#ifdef Py_GIL_DISABLED
2377-
dict = _PyObject_GetManagedDict(owner_o);
2378-
if (dict == NULL) {
2377+
if (dict != _PyObject_GetManagedDict(owner_o)) {
23792378
UNLOCK_OBJECT(dict);
23802379
DEOPT_IF(true);
23812380
}

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)