Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
Closed
Description
We have been bitten a couple of times already if C extension types that implement the GC interface don't callPyObject_GC_UnTrack in theirtp_dealloc slot. The last issue was#95045
Although this is technically not always an error (thetp_free slot untracks the object from the GC), if the GC executes during the deallocator is possible that it will see an object with 0 reference count.
To avoid this in the future, we should add a warning if this happens so we can fix it within CPython