llvm-project/compiler-rt/lib/fuzzer
Max Moroz 10ed68189a Add FuzzedDataProvider helper class / single header library.
Summary:
This class is useful for writing fuzz target that have multiple inputs.

Current CL imports the existing `FuzzedDataProvider` from Chromium
without any modifications. Feel free to review it thoroughly, if you're
interested, but I'd prefer changing the class in a follow up CL.

The CL also introduces an exhaustive test for the library, as the behavior
of `FuzzedDataProvider` must not change over time.

In follow up CLs I'm planning on changing some implementation details
(I can share a doc with some comments to be addressed). After that, we
will document how `FuzzedDataProvider` should be used.

I have tested this on Linux, Windows and Mac platforms.

Reviewers: morehouse, metzman, kcc

Reviewed By: morehouse

Subscribers: metzman, thakis, rnk, mgorny, ormris, delcypher, #sanitizers, llvm-commits

Tags: #llvm, #sanitizers

Differential Revision: https://reviews.llvm.org/D62733

llvm-svn: 363071
2019-06-11 14:30:18 +00:00
..
afl Summary: 2019-04-18 18:49:11 +00:00
dataflow [libFuzzer] DFT: when dumping coverage, also dump the total number of instrumented blocks in a function; update merge_data_flow.py to merge coverage 2019-05-08 17:20:09 +00:00
scripts [libFuzzer] remove the data-flow-trace (DFT) python scripts; their functionality is now part of libFuzzer proper; also write functions.txt to the disk only if this file doesn't exist yet 2019-05-23 01:03:42 +00:00
standalone [libFuzzer] fix missing close on opened file 2019-02-26 19:33:00 +00:00
tests Add FuzzedDataProvider helper class / single header library. 2019-06-11 14:30:18 +00:00
utils Add FuzzedDataProvider helper class / single header library. 2019-06-11 14:30:18 +00:00
CMakeLists.txt change order 2019-04-30 17:58:57 +00:00
FuzzerBuiltins.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FuzzerBuiltinsMsvc.h [libFuzzer][MSVC] Enable building libFuzzer with MSVC 2019-01-22 18:59:25 +00:00
FuzzerCommand.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FuzzerCorpus.h [libFuzzer] add -features_dir= flag to dump unique input features on disk 2019-04-13 00:20:31 +00:00
FuzzerCrossOver.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FuzzerDataFlowTrace.cpp [libFuzzer] when using data-flow-trace (DFT) only load the DFT for the files present in the corpus 2019-05-24 00:43:52 +00:00
FuzzerDataFlowTrace.h [libFuzzer] when using data-flow-trace (DFT) only load the DFT for the files present in the corpus 2019-05-24 00:43:52 +00:00
FuzzerDefs.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FuzzerDictionary.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FuzzerDriver.cpp [libFuzzer] automatically collect the data flow trace (DFT) in the fork mode if -collect_data_flow= is given 2019-05-23 00:22:46 +00:00
FuzzerExtFunctions.def [libFuzzer] Unpoison parameters before calling user callback. 2019-05-09 22:48:46 +00:00
FuzzerExtFunctions.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FuzzerExtFunctionsDlsym.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FuzzerExtFunctionsWeak.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FuzzerExtFunctionsWindows.cpp [libFuzzer] Remove extra semicolons 2019-02-26 17:46:13 +00:00
FuzzerExtraCounters.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FuzzerFlags.def [libFuzzer] small refactoring in the driver; dummy implementation of collect_data_flow; attempt to fix the windows bot 2019-05-10 00:59:32 +00:00
FuzzerFork.cpp [libFuzzer] automatically collect the data flow trace (DFT) in the fork mode if -collect_data_flow= is given 2019-05-23 00:22:46 +00:00
FuzzerFork.h [libFuzzer] add threads to the fork mode: now you can pass -fork=N to run N concurrent workers. Fork mode is still work-in-progress. 2019-02-14 00:25:43 +00:00
FuzzerIO.cpp [libFuzzer] Replace -seed_corpus to better support fork mode on Win 2019-04-30 20:56:18 +00:00
FuzzerIO.h [libFuzzer] Replace -seed_corpus to better support fork mode on Win 2019-04-30 20:56:18 +00:00
FuzzerIOPosix.cpp [libFuzzer] add -features_dir= flag to dump unique input features on disk 2019-04-13 00:20:31 +00:00
FuzzerIOWindows.cpp [libFuzzer] add -features_dir= flag to dump unique input features on disk 2019-04-13 00:20:31 +00:00
FuzzerInterface.h [libFuzzer][Windows] Use dllexport for all declarations in FuzzerInterface.h 2019-01-28 17:51:13 +00:00
FuzzerInternal.h [libFuzzer] code refactoring; NFC 2019-05-10 01:34:26 +00:00
FuzzerLoop.cpp [libFuzzer] when using data-flow-trace (DFT) only load the DFT for the files present in the corpus 2019-05-24 00:43:52 +00:00
FuzzerMain.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FuzzerMerge.cpp [libFuzzer] automatically collect the data flow trace (DFT) in the fork mode if -collect_data_flow= is given 2019-05-23 00:22:46 +00:00
FuzzerMerge.h [libFuzzer] fix the unit tests 2019-02-15 00:15:13 +00:00
FuzzerMutate.cpp [libFuzzer] Make MutateWithMask work when the Mask is shorter than the input. 2019-04-11 18:21:53 +00:00
FuzzerMutate.h [libFuzzer] refactor the way we choose the element to cross-over with, NFC (expected1); add a flag -seed_inputs= to pass extra seed inputs as file paths, not dirs 2019-02-08 01:20:54 +00:00
FuzzerOptions.h [libFuzzer] automatically collect the data flow trace (DFT) in the fork mode if -collect_data_flow= is given 2019-05-23 00:22:46 +00:00
FuzzerRandom.h [libFuzzer] replace slow std::mt19937 with a much faster std::minstd_rand; second attempt after failed r352732, this time with a fix for cmake 2019-02-12 01:00:08 +00:00
FuzzerSHA1.cpp [libFuzzer][MSVC] Enable building libFuzzer with MSVC 2019-01-22 18:59:25 +00:00
FuzzerSHA1.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FuzzerTracePC.cpp [libFuzzer] perform more agressive value profiling in memcmp 2019-05-09 22:09:25 +00:00
FuzzerTracePC.h [libFuzzer] print new functions as they are discovered in the fork mode 2019-02-15 01:22:00 +00:00
FuzzerUtil.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FuzzerUtil.h [libFuzzer] experimental performance optimization -lazy_counters, off by default. Posix-only for now, tested on Linux 2019-01-31 00:09:43 +00:00
FuzzerUtilDarwin.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FuzzerUtilFuchsia.cpp [libFuzzer] Ignore synthetic exceptions on Fuchsia 2019-05-22 16:36:35 +00:00
FuzzerUtilLinux.cpp [libFuzzer] extend the -fork=1 functionality. Still not fully usable, but good enough for the first unit test 2019-02-12 00:12:33 +00:00
FuzzerUtilPosix.cpp [libFuzzer] set libFuzzer's own SEGV handler even one is already present, but call that handler from ours (unless we are unprotecting lazy counters). Call ProtectLazyCounters later, so that it runs after the initialization code in the target. 2019-01-31 01:40:14 +00:00
FuzzerUtilWindows.cpp [libFuzzer] Remove extra semicolons 2019-02-26 17:46:13 +00:00
FuzzerValueBitMap.h [libFuzzer][MSVC] Enable building libFuzzer with MSVC 2019-01-22 18:59:25 +00:00
README.txt [libFuzzer] better README.txt 2017-08-22 01:15:40 +00:00
build.sh Switch from Bourne shell to simply base shell to build libfuzzer 2018-01-12 23:45:24 +00:00

README.txt

See http://llvm.org/docs/LibFuzzer.html