mirror of https://github.com/google/oss-fuzz.git
Fix atheris integration. (#4824)
This commit is contained in:
parent
25988ca5f1
commit
0dd7aaca32
|
@ -92,7 +92,7 @@ for fuzzer in $(find $SRC -name '*_fuzzer.py'); do
|
|||
# library is not required and can lead to unexpected startup crashes.
|
||||
echo "#!/bin/sh
|
||||
# LLVMFuzzerTestOneInput for fuzzer detection.
|
||||
LD_PRELOAD=\$(dirname "\$0")/libclang_rt.asan-x86_64.so \
|
||||
LD_PRELOAD=\$(dirname "\$0")/sanitizer_with_fuzzer.so \
|
||||
ASAN_OPTIONS=\$ASAN_OPTIONS:symbolize=1:detect_leaks=0 \
|
||||
\$(dirname "\$0")/$fuzzer_package \$@" > $OUT/$fuzzer_basename
|
||||
chmod u+x $OUT/$fuzzer_basename
|
||||
|
|
|
@ -97,7 +97,13 @@ export CFLAGS="$CFLAGS $SANITIZER_FLAGS $COVERAGE_FLAGS"
|
|||
export CXXFLAGS="$CFLAGS $CXXFLAGS_EXTRA"
|
||||
|
||||
if [ "$FUZZING_LANGUAGE" = "python" ]; then
|
||||
cp $(find $(llvm-config --libdir) -name "libclang_rt.asan-x86_64.so") $OUT/
|
||||
sanitizer_with_fuzzer_lib_dir=`python3 -c "import atheris; import os; print(os.path.dirname(atheris.path()))"`
|
||||
sanitizer_with_fuzzer_output_lib=$OUT/sanitizer_with_fuzzer.so
|
||||
if [ "$SANITIZER" = "address" ]; then
|
||||
cp $sanitizer_with_fuzzer_lib_dir/asan_with_fuzzer.so $sanitizer_with_fuzzer_output_lib
|
||||
elif [ "$SANITIZER" = "undefined" ]; then
|
||||
cp $sanitizer_with_fuzzer_lib_dir/ubsan_cxx_with_fuzzer.so $sanitizer_with_fuzzer_output_lib
|
||||
fi
|
||||
|
||||
# Disable leak checking as it is unsupported.
|
||||
export CFLAGS="$CFLAGS -fno-sanitize=leak"
|
||||
|
|
|
@ -27,7 +27,7 @@ for fuzzer in $(find $SRC -name '*_fuzzer.py'); do
|
|||
# Create execution wrapper.
|
||||
echo "#!/bin/sh
|
||||
# LLVMFuzzerTestOneInput for fuzzer detection.
|
||||
LD_PRELOAD=\$(dirname "\$0")/libclang_rt.asan-x86_64.so \
|
||||
LD_PRELOAD=\$(dirname "\$0")/sanitizer_with_fuzzer.so \
|
||||
ASAN_OPTIONS=\$ASAN_OPTIONS:symbolize=1:detect_leaks=0 \
|
||||
\$(dirname "\$0")/$fuzzer_package \$@" > $OUT/$fuzzer_basename
|
||||
chmod u+x $OUT/$fuzzer_basename
|
||||
|
|
|
@ -37,7 +37,7 @@ values that are too big or too small is techincally fine; however,
|
|||
misinterpreting them is not.
|
||||
"""
|
||||
|
||||
import atheris
|
||||
import atheris_no_libfuzzer as atheris
|
||||
import json
|
||||
import ujson
|
||||
import sys
|
||||
|
|
|
@ -29,7 +29,7 @@ coverage.
|
|||
"""
|
||||
|
||||
import sys
|
||||
import atheris
|
||||
import atheris_no_libfuzzer as atheris
|
||||
import ujson
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue