2019-03-14 16:30:05 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
#set -x
|
|
|
|
set -e
|
|
|
|
|
2021-08-18 12:45:02 +02:00
|
|
|
. ../test/variables.sh
|
|
|
|
|
2019-11-21 17:22:43 +01:00
|
|
|
# Glib is built without -fno-omit-frame-pointer. We need
|
2019-03-14 16:30:05 +01:00
|
|
|
# to disable the fast unwinder to get full stacktraces.
|
2021-09-12 14:14:24 +02:00
|
|
|
export ASAN_OPTIONS="$ASAN_OPTIONS:fast_unwind_on_malloc=0:allocator_may_return_null=1"
|
|
|
|
export UBSAN_OPTIONS="$UBSAN_OPTIONS:print_stacktrace=1"
|
2019-03-14 16:30:05 +01:00
|
|
|
|
|
|
|
# Hide all warning messages from vips.
|
|
|
|
export VIPS_WARNING=0
|
|
|
|
|
|
|
|
ret=0
|
|
|
|
|
|
|
|
for fuzzer in *_fuzzer; do
|
2021-08-18 12:45:02 +02:00
|
|
|
for file in $top_srcdir/fuzz/common_fuzzer_corpus/*; do
|
2021-09-12 14:14:24 +02:00
|
|
|
exit_code=0
|
|
|
|
./$fuzzer $file || exit_code=$?
|
|
|
|
if [ $exit_code -ne 0 ]; then
|
2019-10-07 16:57:00 +02:00
|
|
|
echo FAIL $fuzzer $file
|
|
|
|
ret=1
|
|
|
|
fi
|
|
|
|
done
|
2019-03-14 16:30:05 +01:00
|
|
|
done
|
|
|
|
|
|
|
|
exit $ret
|