diff options
author | Leandro A. F. Pereira <leandro@hardinfo.org> | 2019-10-23 08:07:27 -0700 |
---|---|---|
committer | jonathanmetzman <31354670+jonathanmetzman@users.noreply.github.com> | 2019-10-23 08:07:27 -0700 |
commit | 705f4f5e4080312ce57f13d6b84c21642162e20f (patch) | |
tree | ba89fa3c69c80a233ac74cf78be1dc06d144f9c9 /projects/lwan | |
parent | d0da30e928473baa7f67aa187dc1d8f21f889d96 (diff) | |
download | oss-fuzz-705f4f5e4080312ce57f13d6b84c21642162e20f.tar.gz |
lwan: Zip fuzzing corpus for new fuzzers without changing build.sh (#2979)
* lwan: Run bash in verbose mode
Printing the whole command line helps debug the fuzzer build process.
* lwan: Zip fuzzing corpus for new fuzzers without changing build.sh
Instead of hardcoding the archiving of corpus-request-* files in the
Lwan repo into request_fuzzer_seed_corpus.zip, use the fuzzer driver
filename to derive the ZIP file name and corpus file names as each
fuzzer is being built.
Diffstat (limited to 'projects/lwan')
-rw-r--r-- | projects/lwan/build.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/projects/lwan/build.sh b/projects/lwan/build.sh index bc3c960fe..bcdd36887 100644 --- a/projects/lwan/build.sh +++ b/projects/lwan/build.sh @@ -1,4 +1,4 @@ -#!/bin/bash -eu +#!/bin/bash -euv # Copyright 2019 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -27,12 +27,14 @@ cmake -GNinja \ ninja -v liblwan.a -zip -jr $OUT/request_fuzzer_seed_corpus.zip $SRC/lwan/fuzz/corpus/corpus-request-* - cp $SRC/lwan/fuzz/*.dict $OUT/ for fuzzer in $SRC/lwan/src/bin/fuzz/*_fuzzer.cc; do executable=$(basename $fuzzer .cc) + corpus_base=$(basename $fuzzer _fuzzer.cc) + + zip -jr $OUT/${executable}_seed_corpus.zip $SRC/lwan/fuzz/corpus/corpus-${corpus_base}-* + $CXX $CXXFLAGS -std=c++11 \ -Wl,-whole-archive $WORK/lwan/src/lib/liblwan.a -Wl,-no-whole-archive \ -I$SRC/lwan/src/lib $fuzzer \ |