-
Notifications
You must be signed in to change notification settings - Fork 219
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
OS_SockAddr_t alignment issue on some architectures #295
Comments
jphickey
added a commit
to jphickey/osal
that referenced
this issue
Dec 3, 2019
Add a union wrapper for the abstract data field such that it will be aligned for 32 bit integer values and/or pointers, whichever is greater. This should be sufficient for casting to the system "struct sockaddr"
jphickey
added a commit
to jphickey/osal
that referenced
this issue
Aug 10, 2022
Create a new background job to handle the maintenance tasks that had been performed in the ES main task as part of the CFE_ES_ScanAppTable() routine. All app state changes, including those invoked by messages, are now handled by this job. This also slightly changes the semantics of CFE_ES_RunLoop and CFE_ES_ExitApp. Now, the CFE_ES_RunLoop routine no longer requires a RunStatus buffer. Instead, the only thing that matters is the RunStatus value that is eventually passed to CFE_ES_ExitApp after the shutdown is complete. This should be mostly backward compatible, as the recommended app pattern would pass the same value to both functions. This commit also fixes nasa#480, as the value passed to CFE_ES_ExitApp will not override a request that was already pending.
jphickey
pushed a commit
to jphickey/osal
that referenced
this issue
Aug 10, 2022
Fix nasa#295, Resolve app table scanning race conditions
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
On some CPU architectures that have strict alignment requirements, the OS socket address storage buffer triggers a warning/error about casts that increase alignment. For example:
To Reproduce
Build on an architecture that has strict alignment requirements (e.g. SPARC, MIPS, etc)
Expected behavior
Should build cleanly, no warnings.
System observed on:
Additional context
Not likely to be a "real" alignment issue as this specific instance follows a uint32 value, so it will already have 32 bit alignment already. Adding a union wrapper will squelch the warning though.
Reporter Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered: