1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
llvm-mirror/lib/Fuzzer
Dan Liew 22b310e67c [LibFuzzer] Fix -jobs=<N> where <N> > 1 and the number of workers is > 1 on macOS.
The original `ExecuteCommand()` called `system()` from the C library.
The C library implementation of this on macOS contains a mutex which
serializes calls to `system()`. This prevented the `-jobs=` flag
from running copies of the fuzzing binary in parallel which is
the opposite of what is intended.

To fix this on macOS an alternative implementation of `ExecuteCommand()`
is provided that can be used concurrently. This is provided in
`FuzzerUtilDarwin.cpp` which is guarded to only compile code on Apple
platforms. The existing implementation has been moved to a new file
`FuzzerUtilLinux.cpp` which is guarded to only compile code on Linux.

This commit includes a simple test to check that LibFuzzer is being
executed in parallel when requested.

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

llvm-svn: 278544
2016-08-12 18:29:36 +00:00
..
afl [libFuzzer] extend the messages printed by afl_driver 2016-07-19 23:18:28 +00:00
test [LibFuzzer] Fix -jobs=<N> where <N> > 1 and the number of workers is > 1 on macOS. 2016-08-12 18:29:36 +00:00
CMakeLists.txt [LibFuzzer] Fix -jobs=<N> where <N> > 1 and the number of workers is > 1 on macOS. 2016-08-12 18:29:36 +00:00
cxx.dict [libFuzzer] add AFL-style dictionary for C++, remove the old file with tokens 2015-12-22 01:50:51 +00:00
FuzzerCrossOver.cpp [libFuzzer] refactor the mutation functions so that they are now methods of a class. NFC 2015-09-03 21:24:19 +00:00
FuzzerDFSan.h [libFuzzer] make libFuzzer build even with a compiler that does not have sanitizer headers 2015-11-13 01:54:40 +00:00
FuzzerDriver.cpp [libFuzzer] add hooks for strstr, strcasestr, strcasecmp, strncasecmp 2016-07-15 23:27:19 +00:00
FuzzerExtFunctions.def [libfuzzer] do not warn about missing pcbuffer functions: they are new. 2016-08-06 17:03:22 +00:00
FuzzerExtFunctions.h [LibFuzzer] Declare and use sanitizer functions in `fuzzer::ExternalFunctions` 2016-06-07 23:32:50 +00:00
FuzzerExtFunctionsDlsym.cpp [LibFuzzer] Reimplement how the optional user functions are called. 2016-06-02 05:48:02 +00:00
FuzzerExtFunctionsWeak.cpp [LibFuzzer] Reimplement how the optional user functions are called. 2016-06-02 05:48:02 +00:00
FuzzerFlags.def [libFuzzer] add hooks for strstr, strcasestr, strcasecmp, strncasecmp 2016-07-15 23:27:19 +00:00
FuzzerFnAdapter.h [LibFuzzer] Add missing #include<string> 2016-05-26 21:54:25 +00:00
FuzzerInterface.h [libfuzzer] custom crossover interface function. 2016-06-07 20:22:15 +00:00
FuzzerInternal.h [sanitizers] trace buffer API to use user-allocated buffer. 2016-08-05 20:09:53 +00:00
FuzzerIO.cpp [LibFuzzer] Declare and use sanitizer functions in `fuzzer::ExternalFunctions` 2016-06-07 23:32:50 +00:00
FuzzerLoop.cpp [libFuzzer] make libFuzzer work with a bit older clang versions 2016-08-06 21:28:56 +00:00
FuzzerMain.cpp [LibFuzzer] Reimplement how the optional user functions are called. 2016-06-02 05:48:02 +00:00
FuzzerMutate.cpp [libFuzzer] add hooks for strstr, strcasestr, strcasecmp, strncasecmp 2016-07-15 23:27:19 +00:00
FuzzerSHA1.cpp
FuzzerTracePC.cpp [LibFuzzer] Provide stub implementation of __sanitizer_cov_trace_pc_indir 2016-06-06 20:27:09 +00:00
FuzzerTracePC.h [libfuzzer] Refactoring coverage state-management code. 2016-05-10 23:43:15 +00:00
FuzzerTraceState.cpp [libFuzzer] properly intercept memmem 2016-07-19 18:29:06 +00:00
FuzzerUtil.cpp [LibFuzzer] Fix -jobs=<N> where <N> > 1 and the number of workers is > 1 on macOS. 2016-08-12 18:29:36 +00:00
FuzzerUtilDarwin.cpp [LibFuzzer] Fix -jobs=<N> where <N> > 1 and the number of workers is > 1 on macOS. 2016-08-12 18:29:36 +00:00
FuzzerUtilLinux.cpp [LibFuzzer] Fix -jobs=<N> where <N> > 1 and the number of workers is > 1 on macOS. 2016-08-12 18:29:36 +00:00
README.txt

Move to http://llvm.org/docs/LibFuzzer.html