Skip to content

Commit dcf5de8

Browse files
committed
gh-151763: Fix OOM cleanup of initial thread state
1 parent 3db3bba commit dcf5de8

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fixed a possible crash during interpreter creation when memory allocation
2+
fails in the free-threaded build.

Python/pystate.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1505,6 +1505,7 @@ alloc_threadstate(PyInterpreterState *interp)
15051505
}
15061506
reset_threadstate(tstate);
15071507
}
1508+
tstate->base.interp = interp;
15081509
return tstate;
15091510
}
15101511

0 commit comments

Comments
 (0)