mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
bpo-20526: Fix PyThreadState_Clear(): don't decref frame (GH-19120)
PyThreadState.frame is a borrowed reference, not a strong reference: PyThreadState_Clear() must not call Py_CLEAR(tstate->frame). Remove test_threading.test_warnings_at_exit(): we cannot warranty that the Python thread state of daemon threads is cleared in a reliable way during Python shutdown.
This commit is contained in:
parent
472fc843ca
commit
5804f878e7
4 changed files with 14 additions and 30 deletions
|
|
@ -55,6 +55,7 @@ struct _ts {
|
|||
struct _ts *next;
|
||||
PyInterpreterState *interp;
|
||||
|
||||
/* Borrowed reference to the current frame (it can be NULL) */
|
||||
struct _frame *frame;
|
||||
int recursion_depth;
|
||||
char overflowed; /* The stack has overflowed. Allow 50 more calls
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue