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