3.12: "Python memory allocator called without holding the GIL" with PyMem_Free
as Py_AtExit
#105690
Labels
3.12
bugs and security fixes
3.13
new features, bugs and security fixes
type-crash
A hard crash of the interpreter, possibly with a core dump
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: