Page MenuHomeFreeBSD

sys: Disable -Walloc-size-larger-than for GCC 9+
ClosedPublic

Authored by jhb on Nov 13 2023, 10:30 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, May 23, 5:58 AM
Unknown Object (File)
Wed, May 20, 6:13 AM
Unknown Object (File)
Sun, May 17, 7:11 AM
Unknown Object (File)
Wed, May 6, 10:16 AM
Unknown Object (File)
Apr 25 2026, 1:10 PM
Unknown Object (File)
Apr 20 2026, 7:04 AM
Unknown Object (File)
Apr 19 2026, 9:54 AM
Unknown Object (File)
Apr 19 2026, 3:34 AM
Subscribers

Details

Summary

By default this warns about sizes larger than PTRDIFF_MAX passed to
malloc (rather than SIZE_MAX). This doesn't trigger
deterministically, but it does trigger for kmalloc() of struct_size()
in iwlwifi's iwl_configure_rxq even when struct_size() is changed to
use PTRDIFF_MAX. NB: struct_size() in Linux caps the size at
SIZE_MAX, not PTRDIFF_MAX via size_mul().

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 54411
Build 51301: arc lint + arc unit