-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
3.12: "Python memory allocator called without holding the GIL" with PyMem_Free
as Py_AtExit
#105690
Comments
The failure indicates that the function registered with It sounds like sip is using |
It's actually calling PyMem_Malloc() - the code was originally written for Python v1.5. There shouldn't be any problem changing this to PyMem_RawMalloc(). Thanks. |
Yeah, the "mem" and "object" allocators default to pymalloc, so I had a 50/50 chance. 😄 Are we okay to close this? |
We can re-open this if there's more to do. |
@philthompson10 @ericsnowcurrently python3.9 came across the same error? Would you mind to give some advice about how to solve it? |
When importing PyQt6 with Python 3.12.0b2 (as well as on the current git 3.12, 0b305e8), it segfaults on exit.
A
--with-pydebug
build instead prints:and aborts in:
To reproduce,
pip install PyQt6
followed by e.g.python3 -c "import PyQt6.QtCore"
.It's unclear to me whether this is an intended/expected regression or not, given that the behavior of
sip
(the C++ bindings behind PyQt) seems somewhat unkosher here. Its maintainer says:So from what I understand, it sounds like this was "if it breaks, you got to keep both pieces" territory to begin with?
However, I was able to bisect this to 6036c3e as part of #101161 ("Clarify GILState-related Code"), which in the commit message claims to be a refactor only:
Thus, I'm erring on the side of caution here, and decided to open an issue anyways - if this is something sip definitely shouldn't be doing that way, feel free to close!
The relevant sip sources can be found on their Mercurial server or in the PyPI sdist (
sipbuild/module/source/13/
).cc @philthompson10 @ericsnowcurrently
The text was updated successfully, but these errors were encountered: