New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PyStructSequence_NewType() not setting proper heap allocation flag? #64265
Comments
If I am not mistaken, I think that PyStructSequence_NewType() should set the Py_TPFLAGS_HEAPTYPE flag in tp->flags (which it currently does not). The original version initially works fine, but ultimately crashes at exit time in finalization with Fatal Python error: type_traverse() called for non-heap type 'E_FILE' #0 0x00007ffff12913d5 in raise () from /lib64/libc.so.6 Setting the flag manually after creation lets the problem disappear. |
See also bpo-15729. |
As commented in bpo-15729, the Py_TPFLAGS_HEAPTYPE flag is now set in PyType_FromSpecWithBases() which is called by PyStructSequence_NewType(). I think this is no longer an issue. |
Thanks @nanjekyejoannah for comment. Yes, I found that the codes are updated. Line 488 in bd44a7e
I close this issue. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: