-
Notifications
You must be signed in to change notification settings - Fork 84
Unaligned EventBuffer on SPARC #311
Copy link
Copy link
Open
Description
The event buffer code in event.c declares EventBuffer as an array of arrays of char. That means the variable may end up not being 8-byte aligned on some systems, such as SPARC systems with the Sun ABI.
Since SPARC requires double values to be 8-byte aligned, this causes crashes.
My current solution is:
char _Alignas(double) EventBuffer[EventKindLIMIT][EventBufferSIZE];
But that is not ISO C90 because it uses _Alignas.
What's a better way to fix this?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels