New submission from junyixie <xie.ju...@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 <rep...@bugs.python.org> <https://bugs.python.org/issue43311> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com