[New-bugs-announce] [issue43311] PyInterpreterState_New use thread tstate before set.
junyixie
report at bugs.python.org
Wed Feb 24 03:30:05 EST 2021
New submission from junyixie <xie.junyi at outlook.com>:
PyInterpreterState_New use thread tstate before set.
PyInterpreterState_New use tstate. but tstate is not set.
tstate will set after PyInterpreterState_New.
PyInterpreterState *interp = PyInterpreterState_New();
if (interp == NULL) {
*tstate_p = NULL;
return _PyStatus_OK();
}
PyThreadState *tstate = PyThreadState_New(interp);
if (tstate == NULL) {
PyInterpreterState_Delete(interp);
*tstate_p = NULL;
return _PyStatus_OK();
}
PyThreadState *save_tstate = PyThreadState_Swap(tstate);
----------
components: Subinterpreters
messages: 387610
nosy: JunyiXie
priority: normal
severity: normal
status: open
title: PyInterpreterState_New use thread tstate before set.
type: crash
versions: Python 3.10
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43311>
_______________________________________
More information about the New-bugs-announce
mailing list