You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because the object we pass into the callback is dead (zero refcount), and if the callback raises an error we try to PyErr_WriteUnraisable with that object as context, which increfs and decrefs it, which recursively again tries to deallocate it, and we end up in infinite recursion and overflowing the stack.
There are various other ways a callback could trigger this issue. We shouldn't pass around dead objects; instead *_dealloc should temporarily resurrect it before calling the callback.