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)
Sun, Oct 27, 8:37 PM
Unknown Object (File)
Oct 14 2024, 6:46 PM
Unknown Object (File)
Oct 7 2024, 5:14 AM
Unknown Object (File)
Oct 5 2024, 9:44 AM
Unknown Object (File)
Oct 5 2024, 3:46 AM
Unknown Object (File)
Oct 2 2024, 11:16 AM
Unknown Object (File)
Oct 2 2024, 9:09 AM
Unknown Object (File)
Oct 2 2024, 8:14 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 Not Applicable
Unit
Tests Not Applicable