-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
BUG: numpy segfaults on import with current CPython main #23766
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
Comments
Cc @lysnikolaou and @mattip - this is interesting timing, after our discussion a few days ago on NumPy needing updates for CPython changes related to immortal objects. @lysnikolaou maybe this is a good place to start digging in? |
Hmm, if it is new in Python 3.12 we don't need to fix 1.24.x. Which is good :) |
I am seeing a failed assert in released cython 0.29.3x here but that has been fixed on cython master to avoid that path for python>=3.12a7. On cython master, compilation fails. In I am curious how you got a build to work with cython master. |
I have
is the full set of cflags I am building with. I'm also going thourgh distutils (changing to meson is on my todo list). |
Thanks |
I just copied that change to Cython 0.29.x in cython/cython@8af954f. It will be included in 0.29.35. |
I looked into this after building with CPython and Cython main. This looks like a bug in CPython, but I'm not sure about it. I've opened an issue on python/cpython#104614 with more info about the code path that fails, in order to discuss what the correct way forward is. |
Brief status update on this: The issue will be fixed upstream in CPython and will be part of beta2, expected early next week. |
I can confirm I was able to build basically everything in the scipy stack from that PR branch (modulo some cython issues that are unrelated). |
This is resolved upstream, closing. |
Describe the issue:
numpy segfaults on import with current CPython main.
Reproduce the code example:
Error message:
Runtime information:
Due to segfault on import can not get this 🤣
I can reproduce this with the ~current main branch of numpy + current cython master branch or with the lastest stable cython (0.29.31) + numpy (1.24.x) from pypi.
discovered via https://github.com/tacaswell/build_the_world
Context for the issue:
I bisected this back to
which came in via python/cpython#103912
The text was updated successfully, but these errors were encountered: