Commit bfc57d4
authored
This fixes a crash in `test_threading.test_reinit_tls_after_fork()` when
running with the GIL disabled. We already properly handle the case where
the thread state is `_Py_THREAD_ATTACHED` in `tstate_delete_common()` --
we just need to remove an assertion.
Keeping the thread attached means that a stop-the-world pause, such as
for a `fork()`, won't commence until we remove our thread state from the
interpreter's linked list. This prevents a crash when the child process
tries to clean up the dead thread states.
1 parent 05e0b67 commit bfc57d4
1 file changed
+0
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1660 | 1660 | | |
1661 | 1661 | | |
1662 | 1662 | | |
1663 | | - | |
1664 | 1663 | | |
1665 | 1664 | | |
1666 | 1665 | | |
| |||
1740 | 1739 | | |
1741 | 1740 | | |
1742 | 1741 | | |
1743 | | - | |
1744 | 1742 | | |
1745 | 1743 | | |
1746 | 1744 | | |
| |||
0 commit comments