Updated fuzzer scripts

Point to new Chromium location
Also enable UBSan

Change-Id: I4ba182e3c6a967ad89090b776d05762fa9ae6e40
This commit is contained in:
Wouter van Oortmerssen
2018-07-16 15:51:01 -07:00
parent 7c3cb5caa1
commit af6c0e6839
4 changed files with 26 additions and 8 deletions

View File

@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
git clone https://chromium.googlesource.com/chromium/llvm-project/llvm/lib/Fuzzer
clang++ -c -g -O2 -std=c++11 Fuzzer/*.cpp -IFuzzer
git clone https://chromium.googlesource.com/chromium/llvm-project/compiler-rt/lib/fuzzer
clang++ -c -g -O2 -std=c++11 fuzzer/*.cpp -Ifuzzer
ar ruv libFuzzer.a Fuzzer*.o
rm -rf Fuzzer *.o
rm -rf fuzzer *.o

View File

@@ -14,7 +14,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
clang++ -fsanitize-coverage=edge -fsanitize=address -std=c++11 -stdlib=libstdc++ -I.. -I../../include flatbuffers_parser_fuzzer.cc ../../src/idl_parser.cpp ../../src/util.cpp libFuzzer.a -o fuzz_parser
clang++ -fsanitize-coverage=edge -fsanitize=address -fsanitize=undefined \
-g -fno-omit-frame-pointer -std=c++11 -stdlib=libstdc++ \
-I.. -I../../include flatbuffers_parser_fuzzer.cc ../../src/idl_parser.cpp \
../../src/util.cpp libFuzzer.a -o fuzz_parser
mkdir -p parser_corpus
cp ../*.json ../*.fbs parser_corpus
./fuzz_parser parser_corpus

View File

@@ -14,7 +14,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
clang++ -fsanitize-coverage=edge -fsanitize=address -std=c++11 -stdlib=libstdc++ -I.. -I../../include flatbuffers_verifier_fuzzer.cc libFuzzer.a -o fuzz_verifier
clang++ -fsanitize-coverage=edge -fsanitize=address -fsanitize=undefined \
-g -fno-omit-frame-pointer -std=c++11 -stdlib=libstdc++ \
-I.. -I../../include flatbuffers_verifier_fuzzer.cc libFuzzer.a -o fuzz_verifier
mkdir -p verifier_corpus
cp ../*.mon verifier_corpus
./fuzz_verifier verifier_corpus