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?
The event buffer code in event.c declares
EventBufferas an array of arrays ofchar. 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
doublevalues to be 8-byte aligned, this causes crashes.My current solution is:
But that is not ISO C90 because it uses
_Alignas.What's a better way to fix this?