mirror of
https://github.com/samba-team/samba.git
synced 2025-01-27 14:04:05 +03:00
f57c0238e9
We work hard to put the primary logic for oss-fuzz here, and where possible into waf, so that only a tiny stub needs to be maintained in the Google oss-fuzz repo. This will be called by build.sh (not copied directly because it is too easy to forget to copy in an updated version when doing development in the docker image). Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Uri Simchoni <uri@samba.org>
22 lines
548 B
Bash
Executable File
22 lines
548 B
Bash
Executable File
#!/bin/sh -e
|
|
|
|
# We have to push to oss-fuzz CFLAGS into the waf ADDITIONAL_CFLAGS
|
|
# as otherwise waf's configure fails linking the first test binary
|
|
ADDITIONAL_CFLAGS=$CFLAGS
|
|
export ADDITIONAL_CFLAGS
|
|
CFLAGS=""
|
|
export CFLAGS
|
|
LD=$CXX
|
|
export LD
|
|
|
|
./configure -C --without-gettext --enable-debug --enable-developer \
|
|
--address-sanitizer --enable-libfuzzer \
|
|
--disable-warnings-as-errors \
|
|
--abi-check-disable \
|
|
--fuzz-target-ldflags=$LIB_FUZZING_ENGINE \
|
|
--nonshared-binary=ALL LINK_CC=$CXX
|
|
|
|
make -j
|
|
|
|
cp bin/fuzz_* $OUT/
|