You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 13, 2021. It is now read-only.
typedef struct attribute((packed)) {
double tow; /< Seconds since the GPS start of week. */
u16 wn; /< GPS week number. */
} gps_time_t;
ARMv6 and ARMv7 architectures support unaligned loads for everything everything except double-word structures.
This struct, since it is packed, can cause alignment crashes if an array of these are created and loaded, or if it is inserted into another packed struct.
The text was updated successfully, but these errors were encountered:
OK, so this appears to be caught by the compiler, that generates two LDR instructions that can be word-unaligned, rather than a LDRD instruction which has to be word-aligned.
To cause a segfault because of an unaligned LDRD, you can use this snippet:
In gpstime.h
typedef struct attribute((packed)) {
double tow; /< Seconds since the GPS start of week. */
u16 wn; /< GPS week number. */
} gps_time_t;
ARMv6 and ARMv7 architectures support unaligned loads for everything everything except double-word structures.
This struct, since it is packed, can cause alignment crashes if an array of these are created and loaded, or if it is inserted into another packed struct.
The text was updated successfully, but these errors were encountered: