Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix a crash when thread state creation fails before the thread state is fully
initialized.
2 changes: 2 additions & 0 deletions Python/pystate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1508,6 +1508,8 @@ alloc_threadstate(PyInterpreterState *interp)
}
reset_threadstate(tstate);
}
// Set the interpreter before any later initialization can fail.
tstate->base.interp = interp;
return tstate;
}

Expand Down
Loading