Skip to content

Commit

Permalink
Add suppression for known leak (Exiv2#1821)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinbackhouse committed Aug 6, 2021
1 parent d591826 commit e5a7c89
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fuzz/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This is the command to run the fuzzer for 2 minutes:
```bash
cd <exiv2dir>/build-fuzz
mkdir corpus
./bin/fuzz-read-print-write corpus ../test/data/ -dict=../fuzz/exiv2.dict -jobs=$(nproc) -workers=$(nproc) -max_total_time=120
LSAN_OPTIONS=suppressions=../fuzz/knownleaks.txt ./bin/fuzz-read-print-write corpus ../test/data/ -dict=../fuzz/exiv2.dict -jobs=$(nproc) -workers=$(nproc) -max_total_time=120
```

Alternatively, a simple script is provided for running the fuzzer in a continuous loop:
Expand Down
4 changes: 2 additions & 2 deletions fuzz/fuzzloop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ do
mv corpus/ corpus2
mkdir corpus
echo minimizing corpus
./bin/fuzz-read-print-write -merge=1 corpus ../test/data/ corpus2/
LSAN_OPTIONS=suppressions=../fuzz/knownleaks.txt ./bin/fuzz-read-print-write -merge=1 corpus ../test/data/ corpus2/
rm -r corpus2

# Run the fuzzer for 4 hours
date
echo start fuzzer
./bin/fuzz-read-print-write corpus -dict=../fuzz/exiv2.dict -jobs=$(nproc) -workers=$(nproc) -max_total_time=14400
LSAN_OPTIONS=suppressions=../fuzz/knownleaks.txt ./bin/fuzz-read-print-write corpus -dict=../fuzz/exiv2.dict -jobs=$(nproc) -workers=$(nproc) -max_total_time=14400
done
4 changes: 4 additions & 0 deletions fuzz/knownleaks.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Known memory leak in expat, caused by xmpsdk throwing an exception.
# See https://github.com/Exiv2/exiv2/issues/1821
leak:libexpat.so

0 comments on commit e5a7c89

Please sign in to comment.