Page MenuHomeFreeBSD

libsa: errors with pointer conversion
ClosedPublic

Authored by tsoome on Jul 31 2025, 9:55 PM.
Tags
None
Referenced Files
F149161073: D51662.id159521.diff
Sun, Mar 22, 4:18 PM
Unknown Object (File)
Wed, Mar 18, 10:47 PM
Unknown Object (File)
Thu, Feb 26, 2:58 AM
Unknown Object (File)
Feb 7 2026, 11:02 PM
Unknown Object (File)
Feb 7 2026, 4:20 PM
Unknown Object (File)
Jan 30 2026, 4:27 PM
Unknown Object (File)
Jan 10 2026, 2:06 PM
Unknown Object (File)
Dec 24 2025, 6:26 PM
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