Page MenuHomeFreeBSD

libsa: errors with pointer conversion
ClosedPublic

Authored by tsoome on Jul 31 2025, 9:55 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 4, 10:16 AM
Unknown Object (File)
Thu, Nov 27, 5:32 PM
Unknown Object (File)
Oct 28 2025, 2:46 PM
Unknown Object (File)
Oct 27 2025, 2:07 AM
Unknown Object (File)
Oct 23 2025, 10:41 PM
Unknown Object (File)
Oct 18 2025, 1:55 PM
Unknown Object (File)
Oct 11 2025, 5:28 AM
Unknown Object (File)
Oct 11 2025, 5:27 AM
Subscribers

Details

Summary

loader ip implementation is using pointer to structure ip to receive
the packet and is using this pointer to cast on other data types
(namely structure arphdr). Problem does arise when those data structures
are declared with different alignment rules and when/if the compiler
does check those rules. To work around and silence warnings, use
void * generic pointer instead.

Error seen with gcc 14 (-Werror=address-of-packed-member).

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable