HomeFreeBSD

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

Description

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

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().

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D42587

Details

Provenance
jhbAuthored on Nov 15 2023, 2:37 AM
Reviewer
imp
Differential Revision
D42587: sys: Disable -Walloc-size-larger-than for GCC 9+
Parents
rGbe909a79a8e2: qlnx: Fix a couple of type mismatches in function declarations
Branches
Unknown
Tags
Unknown