aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah Snyder <30635813+micahsnyder@users.noreply.github.com>2020-01-29 15:12:15 -0500
committerGitHub <noreply@github.com>2020-01-29 12:12:15 -0800
commit606824ae7ca405223e5c243765198058564952b6 (patch)
treef10a5fefb59d4757258b56bbc9bda7e981f7ebf6
parent8ffc6db00c83e5f75e92b3c4c63c1924597711a1 (diff)
downloadoss-fuzz-606824ae7ca405223e5c243765198058564952b6.tar.gz
[ClamAV] Disable mempool at compile time (#3304)
ClamAV's mempool feature uses mmap to improve performance for some memory allocations. As currently implemented, on systems that support mmap's MAP_ANONYMOUS flag, fmaps are backed by mmap'd memory. Valgrind and ASan can't track mmap-backed memory, though, so it's more difficult to track down fmap-related memory errors. The changes in this commit to clamav's build script should disable mmap usage, and hopefully allow oss-fuzz to catch more bugs.
-rwxr-xr-xprojects/clamav/build.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/projects/clamav/build.sh b/projects/clamav/build.sh
index c383ab61e..716bc8a68 100755
--- a/projects/clamav/build.sh
+++ b/projects/clamav/build.sh
@@ -21,7 +21,7 @@
rm -rf ${WORK}/build
mkdir -p ${WORK}/build
cd ${WORK}/build
-${SRC}/clamav-devel/configure --enable-fuzz=yes --with-libjson=no --with-pcre=no --enable-static=yes --enable-shared=no --disable-llvm --host=x86_64-unknown-linux-gnu
+ac_cv_c_mmap_anonymous=no ${SRC}/clamav-devel/configure --disable-mempool --enable-fuzz=yes --with-libjson=no --with-pcre=no --enable-static=yes --enable-shared=no --disable-llvm --host=x86_64-unknown-linux-gnu
make clean
make -j"$(nproc)"