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
F93358473: D42587.id.diff
Mon, Sep 9, 3:28 AM
Unknown Object (File)
Sun, Sep 8, 11:32 AM
Unknown Object (File)
Thu, Sep 5, 1:33 PM
Unknown Object (File)
Tue, Sep 3, 5:33 AM
Unknown Object (File)
Sat, Aug 31, 4:12 AM
Unknown Object (File)
Mon, Aug 19, 12:38 AM
Unknown Object (File)
Wed, Aug 14, 9:43 PM
Unknown Object (File)
Wed, Aug 14, 9:43 PM
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