zephyr/include
Robert Lubos 48d1a01b2d net: sockets: Specify alignment for sockaddr* structs
To avoid misalignment errors when casting between
sockaddr_storage/sockaddr and specialied sockaddr_* variants, specify
alignment for the former to match the alignment of the others.

The issue was reported by UBSAN:

  utils.c:802:8: runtime error: member access within misaligned
  address 0xf4aff186 for type 'struct sockaddr_in6', which requires
  4 byte alignment

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-07-04 13:16:32 -05:00
..
zephyr net: sockets: Specify alignment for sockaddr* structs 2025-07-04 13:16:32 -05:00