Don't instrument the rdtsc ifunc when building with ASAN/UBSAN
The ifunc resolver is called before the sanitizer runtime is initialized, so any instrumentation results in an immediate crash. Reviewed By: kib Differential Revision: https://reviews.freebsd.org/D31046
This commit is contained in:
@@ -12,3 +12,11 @@ MAN+= \
|
||||
.if ${MACHINE_CPUARCH} == "amd64" && ${MK_HYPERV} != "no"
|
||||
CFLAGS+= -DWANT_HYPERV
|
||||
.endif
|
||||
# We can't use sanitizer instrumentation on ifuncs called during sanitizer
|
||||
# runtime startup.
|
||||
.if ${MK_ASAN} != "no"
|
||||
CFLAGS.__vdso_gettc.c+=-fno-sanitize=address
|
||||
.endif
|
||||
.if ${MK_UBSAN} != "no"
|
||||
CFLAGS.__vdso_gettc.c+=-fno-sanitize=undefined
|
||||
.endif
|
||||
|
||||
Reference in New Issue
Block a user