diff options
author | Luca Boccassi <bluca@debian.org> | 2020-05-25 02:30:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-24 18:30:11 -0700 |
commit | dfa5a7976f1bfeedbddac27e71d80a6c840745ca (patch) | |
tree | 44c5b94e31d0b40469291dc3433a3ac2d29b3191 /projects/libzmq | |
parent | 854bc5f736a3c847d8b1a26921b5e8825e8d45be (diff) | |
download | oss-fuzz-dfa5a7976f1bfeedbddac27e71d80a6c840745ca.tar.gz |
libzmq: fix MSAN (#3868)
* libzmq: build libsodium with --disable-asm to avoid false positives in MSAN checks
* libzmq: set autoconf install prefix to avoid /usr/local being added to the linker library paths
A non-working version of the standard library is installed in oss-fuzz's images
under /usr/local/lib. Using it breaks MSAN's tests with false positives.
Set the prefix in autoconf to something different from the default
/usr/local, as /lib is added by autoconf automatically to the linker
flags, which means this broken standard library is used instead of the
instrumented one in /usr/lib.
Diffstat (limited to 'projects/libzmq')
-rwxr-xr-x | projects/libzmq/build.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/projects/libzmq/build.sh b/projects/libzmq/build.sh index 76758d2a8..389b7f65f 100755 --- a/projects/libzmq/build.sh +++ b/projects/libzmq/build.sh @@ -19,14 +19,14 @@ # build project and dependencies cd "${SRC}/libsodium" DO_NOT_UPDATE_CONFIG_SCRIPTS=1 ./autogen.sh -./configure --disable-shared +./configure --disable-shared --prefix=/install_prefix --disable-asm make -j$(nproc) V=1 install DESTDIR=/tmp/zmq_install_dir cd "${SRC}/libzmq" ./autogen.sh -export LDFLAGS="$(PKG_CONFIG_PATH=/tmp/zmq_install_dir/usr/local/lib/pkgconfig pkg-config --static --libs --define-prefix libsodium)" -export CXXFLAGS="$CXXFLAGS $(PKG_CONFIG_PATH=/tmp/zmq_install_dir/usr/local/lib/pkgconfig pkg-config --static --cflags --define-prefix libsodium)" -./configure --disable-shared --disable-perf --disable-curve-keygen PKG_CONFIG_PATH=/tmp/zmq_install_dir/usr/local/lib/pkgconfig --with-libsodium=yes --with-fuzzing-installdir=fuzzers --with-fuzzing-engine=$LIB_FUZZING_ENGINE +export LDFLAGS+=" $(PKG_CONFIG_PATH=/tmp/zmq_install_dir/install_prefix/lib/pkgconfig pkg-config --static --libs --define-prefix libsodium)" +export CXXFLAGS+=" $(PKG_CONFIG_PATH=/tmp/zmq_install_dir/install_prefix/lib/pkgconfig pkg-config --static --cflags --define-prefix libsodium)" +./configure --disable-shared --prefix=/install_prefix --disable-perf --disable-curve-keygen PKG_CONFIG_PATH=/tmp/zmq_install_dir/install_prefix/lib/pkgconfig --with-libsodium=yes --with-fuzzing-installdir=fuzzers --with-fuzzing-engine=$LIB_FUZZING_ENGINE make -j$(nproc) V=1 install DESTDIR=/tmp/zmq_install_dir -cp /tmp/zmq_install_dir/usr/local/fuzzers/* "${OUT}" +cp /tmp/zmq_install_dir/install_prefix/fuzzers/* "${OUT}" |