Skip to content

Conversation

@charris
Copy link
Member

@charris charris commented Jun 5, 2025

GCC 15 generates code that segfaults on newer hardware when running tests. See gh-28991 for details. A fix is to always require alignment, which can be done by setting NPY_ALIGNMENT_REQUIRED = 1.

We retain NPY_ALIGNMENT_REQUIRED here for downstream compatibility in the 2.3.x release series, but do remove its use in our own code. The associated macro NPY_USE_UNALIGNED_ACCESS could also be removed as it is always 0, but that is left for another PR.

This is a stripped down version of #29094.

GCC 15 generates code that segfaults on newer hardware when running
tests. See numpygh-28991 for details. A fix is to always require alignment,
which can be done by setting `NPY_ALIGNMENT_REQUIRED = 1`.

We retain `NPY_ALIGNMENT_REQUIRED` here for downstream compatibility in
the 2.3.x release series, but do remove its use in our own code. The
associated macro `NPY_USE_UNALIGNED_ACCESS` could also be removed as it
is always 0, but that is left for another PR.
@charris charris added this to the 2.3.0 release milestone Jun 5, 2025
@ngoldbaum
Copy link
Member

I'm impressed that you hit three different CI heisenbugs 😄

@charris
Copy link
Member Author

charris commented Jun 5, 2025

I'm impressed that you hit three different CI heisenbugs

I thought it pretty wonderful myself :)

@charris charris merged commit 1e103cd into numpy:maintenance/2.3.x Jun 5, 2025
91 of 94 checks passed
@ngoldbaum
Copy link
Member

Can you merge this branch into main too? Thanks!

@charris
Copy link
Member Author

charris commented Jun 5, 2025

Can you merge this branch into main too

OK

@charris charris deleted the fix-gcc15-compile branch June 5, 2025 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants