Skip to content

Commit 214b254

Browse files
committed
Fix global membership in LOAD_NAME
1 parent 5ff0dd2 commit 214b254

File tree

4 files changed

+148044
-0
lines changed

4 files changed

+148044
-0
lines changed

Python/bytecodes.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1799,6 +1799,9 @@ dummy_func(
17991799
ERROR_IF(v_o == NULL);
18001800
if (PyLazyImport_CheckExact(v_o)) {
18011801
PyObject *l_v = _PyImport_LoadLazyImportTstate(tstate, v_o);
1802+
if (l_v != NULL && PyDict_SetItem(GLOBALS(), name, l_v) < 0) {
1803+
JUMP_TO_LABEL(error);
1804+
}
18021805
Py_DECREF(v_o);
18031806
v_o = l_v;
18041807
ERROR_IF(v_o == NULL);

0 commit comments

Comments
 (0)