HomeFreeBSD

libc: Disable ASAN for certain string functions

Description

libc: Disable ASAN for certain string functions

They deliberately read out-of-bounds values to avoid byte-by-byte
loads and check multiple bytes at once. While this will work on x86,
it is flagged as an out-of-bounds read with ASAN, so we have to
disable instrumentation here. This also causes bounds errors for CHERI,
so in CheriBSD we use implementations that avoid OOB reads.

Differential Revision: https://reviews.freebsd.org/D31045

Details

Provenance
arichardsonAuthored on Aug 2 2021, 8:51 AM
Differential Revision
D31045: libc: Disable ASAN for certain string functions
Parents
rGf0712132b68b: Don't instrument the rdtsc ifunc when building with ASAN/UBSAN
Branches
Unknown
Tags
Unknown