Page MenuHomeFreeBSD

gcc: quiet Wattribute for no_sanitize("address")
ClosedPublic

Authored by rlibby on Dec 19 2019, 9:46 AM.
Tags
None
Referenced Files
F86689523: D22875.diff
Mon, Jun 24, 1:31 AM
Unknown Object (File)
Thu, Jun 13, 4:06 AM
Unknown Object (File)
Mar 19 2024, 6:51 AM
Unknown Object (File)
Feb 15 2024, 6:47 AM
Unknown Object (File)
Jan 29 2024, 9:26 PM
Unknown Object (File)
Dec 22 2023, 11:22 AM
Unknown Object (File)
Dec 20 2023, 6:26 AM
Unknown Object (File)
Dec 14 2023, 6:44 PM
Subscribers

Details

Summary

This is an unfortunate instances where the __has_attribute check does
not function usefully. Gcc does have the attribute, but for gcc it only
applies to functions, not variables, and trying to apply it to a
variable generates Wattribute. So far we only apply the attribute to
variables. Only enable the attribute for clang, for now.

Test Plan

make buildkernel
make CROSS_TOOLCHAIN=amd64-gcc9 buildkernel

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Works for now. If I have time over the break I’ll take a look at whether gcc could easily be extended to apply this attribute to variables where it makes sense.

This revision is now accepted and ready to land.Dec 19 2019, 4:29 PM
This revision was automatically updated to reflect the committed changes.