aboutsummaryrefslogtreecommitdiff
path: root/projects/opus
diff options
context:
space:
mode:
authorFelicia Lim <felicialim@users.noreply.github.com>2020-06-21 16:34:41 -0700
committerGitHub <noreply@github.com>2020-06-21 16:34:41 -0700
commitbe9ec2bcd15cb2b0a907ea33091588096dd5d410 (patch)
treef8d768b206e7c801bb59332c5b3c9ea23a131a24 /projects/opus
parent50bc1d647c6c70d4d77e2ea662bc31fa4a2bad1b (diff)
downloadoss-fuzz-be9ec2bcd15cb2b0a907ea33091588096dd5d410.tar.gz
[opus] Build with -D_FORTIFY_SOURCE=0 to avoid msan false positives (#4007)
* [opus] Build with -D_FORTIFY_SOURCE=0 to avoid msan false positives Without this, a silk_memcpy call could resolve to __memcpy_chk, which does not have an msan intercept, leading to false use-of-uninitialized-value errors. * [opus] Consolidate cflags * [opus] Fix typo
Diffstat (limited to 'projects/opus')
-rw-r--r--projects/opus/build.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/projects/opus/build.sh b/projects/opus/build.sh
index ae86054ca..0cd91bf76 100644
--- a/projects/opus/build.sh
+++ b/projects/opus/build.sh
@@ -21,6 +21,10 @@ BUILDS=(floating fixed)
tar xvf $SRC/opus_testvectors.tar.gz
+if [[ $CFLAGS = *sanitize=memory* ]]; then
+ CFLAGS+=" -D_FORTIFY_SOURCE=0"
+fi
+
./autogen.sh
for build in "${BUILDS[@]}"; do
@@ -34,7 +38,6 @@ for build in "${BUILDS[@]}"; do
esac
./configure $extra_args --enable-static --disable-shared --disable-doc
- make clean
make -j$(nproc)
# Build all fuzzers
@@ -42,6 +45,7 @@ for build in "${BUILDS[@]}"; do
$CC $CFLAGS -c -Iinclude \
tests/$fuzzer.c \
-o $fuzzer.o
+
$CXX $CXXFLAGS \
$fuzzer.o \
-o $OUT/${fuzzer}_${build} \