mirror of https://github.com/python/cpython
Fix a compiler warning in _xxsubinterpretermodule.c (#103245)
Fix a (correct) warning about potential uses of uninitialized memory in _xxsubinterpreter. Unlike newly allocated PyObject structs or global structs, stack-allocated structs are not initialised, and a few places in the code expect the _sharedexception struct data to be either NULL or initialised.
This commit is contained in:
parent
c00dcf0e38
commit
89e6a34461
|
@ -481,7 +481,7 @@ _run_script_in_interpreter(PyObject *mod, PyInterpreterState *interp,
|
|||
}
|
||||
|
||||
// Run the script.
|
||||
_sharedexception exc;
|
||||
_sharedexception exc = {NULL, NULL};
|
||||
int result = _run_script(interp, codestr, shared, &exc);
|
||||
|
||||
// Switch back.
|
||||
|
|
Loading…
Reference in New Issue