libc/amd64: Disable ASAN for amd64_archlevel.c

The code in this file runs before the sanitizer can initialize its
shadow map.

Fixes:	ad2fac552c ("lib/libc/amd64: add archlevel-based simd dispatch framework")
This commit is contained in:
Mark Johnston 2024-01-27 21:49:41 -05:00
parent 3883c6fbf2
commit 4dedcb1bb5

View file

@ -28,3 +28,9 @@ MDSRCS+= \
strspn.S \
timingsafe_bcmp.S \
timingsafe_memcmp.S
.if ${MK_ASAN} != "no"
# Disable ASAN for amd64_archlevel.c since its code is executed before the
# sanitizer runtime can initialize itself.
CFLAGS.amd64_archlevel.c+= -fno-sanitize=address
.endif