nDPI: fix MSAN support (#9091)

With MSAN sanitizer we need to instrument all the dependencies. See
#9088
This commit is contained in:
Ivan Nardi 2022-11-29 21:44:12 +01:00 committed by GitHub
parent 675c275884
commit fbf649a9fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 10 deletions

View File

@ -15,12 +15,14 @@
#
################################################################################
#Disable code instrumentation
CFLAGS_SAVE="$CFLAGS"
CXXFLAGS_SAVE="$CXXFLAGS"
unset CFLAGS
unset CXXFLAGS
export AFL_NOOPT=1
if [[ "$SANITIZER" != "memory" ]]; then
#Disable code instrumentation
CFLAGS_SAVE="$CFLAGS"
CXXFLAGS_SAVE="$CXXFLAGS"
unset CFLAGS
unset CXXFLAGS
export AFL_NOOPT=1
fi
# build libpcap
tar -xvzf libpcap-1.9.1.tar.gz
@ -37,10 +39,12 @@ cmake -DBUILD_SHARED_LIBS=OFF ..
make install
cd ../..
#Re-enable code instrumentation
export CFLAGS="${CFLAGS_SAVE}"
export CXXFLAGS="${CXXFLAGS_SAVE}"
unset AFL_NOOPT
if [[ "$SANITIZER" != "memory" ]]; then
#Re-enable code instrumentation
export CFLAGS="${CFLAGS_SAVE}"
export CXXFLAGS="${CXXFLAGS_SAVE}"
unset AFL_NOOPT
fi
# build project
cd ndpi