mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-22 09:19:06 +08:00
ci: turn off _FORTIFY_SOURCE explicitly
libelf is compiled with _FORTIFY_SOURCE by default and it isn't compatible with MSan. It was borrowed from https://github.com/google/oss-fuzz/pull/7422
This commit is contained in:
committed by
Andrii Nakryiko
parent
14414c6ea5
commit
8bc3e510fc
@@ -17,6 +17,14 @@ mkdir -p "$OUT"
|
||||
|
||||
export LIB_FUZZING_ENGINE=${LIB_FUZZING_ENGINE:--fsanitize=fuzzer}
|
||||
|
||||
# libelf is compiled with _FORTIFY_SOURCE by default and it
|
||||
# isn't compatible with MSan. It was borrowed
|
||||
# from https://github.com/google/oss-fuzz/pull/7422
|
||||
if [[ "$SANITIZER" == memory ]]; then
|
||||
CFLAGS+=" -U_FORTIFY_SOURCE"
|
||||
CXXFLAGS+=" -U_FORTIFY_SOURCE"
|
||||
fi
|
||||
|
||||
# The alignment check is turned off by default on OSS-Fuzz/CFLite so it should be
|
||||
# turned on explicitly there. It was borrowed from
|
||||
# https://github.com/google/oss-fuzz/pull/7092
|
||||
|
||||
Reference in New Issue
Block a user