From 4216de6a3336cbc6dddb572cb7e6ab6193bf3729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Fri, 29 Nov 2019 11:26:35 +0100 Subject: New upstream version 6.9.4 --- contributed/libfuzzer-onig.cpp | 45 ------------------------------------------ contributed/makefile | 21 -------------------- 2 files changed, 66 deletions(-) delete mode 100644 contributed/libfuzzer-onig.cpp delete mode 100644 contributed/makefile (limited to 'contributed') diff --git a/contributed/libfuzzer-onig.cpp b/contributed/libfuzzer-onig.cpp deleted file mode 100644 index 526c826..0000000 --- a/contributed/libfuzzer-onig.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* libfuzzer test code for oniguruma - * author: Hanno Böck, license: CC0/public domain - -Usage: -* compile oniguruma with something like - ./configure CC=clang LD=clang CFLAGS="-fsanitize-coverage=edge -fsanitize=address" \ - LDFLAGS="-fsanitize-coverage=edge -fsanitize=address" -* Compile libfuzzer stub and link against static libonig.a and libFuzzer.a: - clang++ libfuzzer-onig.cpp src/.libs/libonig.a libFuzzer.a -o libfuzzer-onig \ - -fsanitize-coverage=edge -fsanitize=address -* Put sample patterns in directory "in/" -* Run - ./libfuzzer-onig in - -Consult libfuzzer docs for further details and how to create libFuzzer.a: -http://llvm.org/docs/LibFuzzer.html - - */ -#include -#include -#include - -extern "C" int LLVMFuzzerTestOneInput(const uint8_t * Data, size_t Size) -{ - regex_t *reg; - OnigEncoding enc; - - enc = ONIG_ENCODING_UTF8; - -#ifdef FULL_TEST - onig_initialize(&enc, 1); - onig_set_retry_limit_in_match(120); - onig_set_parse_depth_limit(120); -#endif - - if (onig_new(®, Data, Data + Size, ONIG_OPTION_DEFAULT, enc, - ONIG_SYNTAX_DEFAULT, 0) == 0) - onig_free(reg); - -#ifdef FULL_TEST - onig_end(); -#endif - - return 0; -} diff --git a/contributed/makefile b/contributed/makefile deleted file mode 100644 index f44a3c0..0000000 --- a/contributed/makefile +++ /dev/null @@ -1,21 +0,0 @@ -ONIG_LIB=../src/.libs/libonig.a -LIBS=$(ONIG_LIB) /usr/local/lib/libLLVMFuzzerMain.a - -TARGETS=libfuzzer-onig libfuzzer-onig-full - -default: $(TARGETS) - -libfuzzer-onig: libfuzzer-onig.cpp $(ONIG_LIB) - clang++ $< $(LIBS) -o $@ -fsanitize-coverage=trace-pc-guard -fsanitize=fuzzer,address - -libfuzzer-onig-full: libfuzzer-onig.cpp $(ONIG_LIB) - clang++ -DFULL_TEST $< $(LIBS) -o $@ -fsanitize-coverage=trace-pc-guard -fsanitize=fuzzer,address - - -$(ONIG_LIB): - cd ..; ./configure CC=clang LD=clang CFLAGS="-g -fsanitize=fuzzer,address" LDFLAGS="-fsanitize-coverage=trace-pc-guard -fsanitize=fuzzer,address"; make - - - -clean: - rm -f $(TARGETS) -- cgit v1.2.3