Fix global membership in LOAD_NAME

This commit is contained in:
Pablo Galindo 2025-10-07 11:41:19 +01:00
parent 5ff0dd2363
commit 214b2543ee
4 changed files with 148044 additions and 0 deletions

View file

@ -1799,6 +1799,9 @@ dummy_func(
ERROR_IF(v_o == NULL);
if (PyLazyImport_CheckExact(v_o)) {
PyObject *l_v = _PyImport_LoadLazyImportTstate(tstate, v_o);
if (l_v != NULL && PyDict_SetItem(GLOBALS(), name, l_v) < 0) {
JUMP_TO_LABEL(error);
}
Py_DECREF(v_o);
v_o = l_v;
ERROR_IF(v_o == NULL);