-
Notifications
You must be signed in to change notification settings - Fork 62
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
Pointer alignmnet issues on 32 bit ARM #93
Comments
On closer inspection, the offending code seems to be a https://github.com/nasa/cFS-GroundSystem/blob/master/Subsystems/cmdUtil/SendUdp.c#L89 Weird. Both pointer types appear to have the same size and alignment according to |
The problem is that it's casting a Roundabout fix would be to create a union with both a |
Or use getnameinfo? Either way that function needs some work... |
In the meantime, it looks like |
Also observed by @hukuzatuna. Recreated on gcc 8+ with cast-align=strict. |
Fix #93, Refactor and resolve cast align warning
It looks like some struct has changed size and it no longer aligns nicely with 32 bit ARM. It's possible that this software simply shouldn't be compiled on this platform and instead it should be reserved for an x86/x86_64 based ground station.
Steps to reproduce the behavior:
Expected behavior:
Structs sizes should align so that casts can be made on platforms that do not allow unaligned access (such as ARM).
Code snips:
System observed on:
a4345d87c01b1818bdb217ffd4dcce8bf86e33fe
, cFS-GroundSystem git commit1c31f94f3b63d3ff9c5da35ca9f8825a89ef3258
The text was updated successfully, but these errors were encountered: