Skip to content
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

BUILD BREAK: arm/palette_neon_intrinsics.c fails to compile with -Wcast-align #605

Open
jbowler opened this issue Sep 23, 2024 · 0 comments

Comments

@jbowler
Copy link
Contributor

jbowler commented Sep 23, 2024

This is a clear problem because the code is apparently taking advantage of spurious memory alignment; this may change on some systems and may potentially crash on some systems.

The code in question added a png_bytep called riffled_palette to pngstruct.h which is, in fact, not used as a png_bytep rather it is a png_uint_32p.

I think the fix is just to make the declaration of riffled_palette png_uint_32p but doing this requires significant changes to the supplied code (i.e. a quick hack may or may not be correct) so requires the maintainer.

It also seems to be the case that the code does not require any more than byte alignment, so maybe the fix is to just declare the riffled_palette a png_voidp.

@richard-townsend-arm as the maintainer, please comment.
@ctruta please also check #266 for background, and your comments at the end. Perhaps this is something that can be undealt with in 1.8?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant