mirror of https://github.com/google/oss-fuzz.git
nDPI: fix MSAN support (#9091)
With MSAN sanitizer we need to instrument all the dependencies. See #9088
This commit is contained in:
parent
675c275884
commit
fbf649a9fe
|
@ -15,12 +15,14 @@
|
||||||
#
|
#
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
#Disable code instrumentation
|
if [[ "$SANITIZER" != "memory" ]]; then
|
||||||
CFLAGS_SAVE="$CFLAGS"
|
#Disable code instrumentation
|
||||||
CXXFLAGS_SAVE="$CXXFLAGS"
|
CFLAGS_SAVE="$CFLAGS"
|
||||||
unset CFLAGS
|
CXXFLAGS_SAVE="$CXXFLAGS"
|
||||||
unset CXXFLAGS
|
unset CFLAGS
|
||||||
export AFL_NOOPT=1
|
unset CXXFLAGS
|
||||||
|
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 ../..
|
||||||
|
|
||||||
#Re-enable code instrumentation
|
if [[ "$SANITIZER" != "memory" ]]; then
|
||||||
export CFLAGS="${CFLAGS_SAVE}"
|
#Re-enable code instrumentation
|
||||||
export CXXFLAGS="${CXXFLAGS_SAVE}"
|
export CFLAGS="${CFLAGS_SAVE}"
|
||||||
unset AFL_NOOPT
|
export CXXFLAGS="${CXXFLAGS_SAVE}"
|
||||||
|
unset AFL_NOOPT
|
||||||
|
fi
|
||||||
|
|
||||||
# build project
|
# build project
|
||||||
cd ndpi
|
cd ndpi
|
||||||
|
|
Loading…
Reference in New Issue