1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
llvm-mirror/lib/Fuzzer/test
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
..
dfsan [LibFuzzer] Refactor declaration of tests in CMake. 2016-05-27 03:14:40 +00:00
no-coverage [libFuzzer] add a test that is built w/o coverage instrumentation but has the coverage rt (it should now fail with a descriptive message) 2016-06-08 01:46:13 +00:00
trace-bb [LibFuzzer] Refactor declaration of tests in CMake. 2016-05-27 03:14:40 +00:00
trace-pc [LibFuzzer] Refactor declaration of tests in CMake. 2016-05-27 03:14:40 +00:00
ubsan [LibFuzzer] Refactor declaration of tests in CMake. 2016-05-27 03:14:40 +00:00
uninstrumented [libFuzzer] add a test that is built w/o coverage instrumentation but has the coverage rt (it should now fail with a descriptive message) 2016-06-08 01:46:13 +00:00
unit
AccumulateAllocationsTest.cpp [libFuzzer] disable leak detection if we have tried it for 1000 times w/o finding a leak 2016-04-27 19:52:34 +00:00
afl-driver-extra-stats.test [libFuzzer] Let user specify extra stats file. 2016-06-30 20:43:06 +00:00
afl-driver-stderr.test [libFuzzer] Let user specify extra stats file. 2016-06-30 20:43:06 +00:00
AFLDriverTest.cpp [LibFuzzer] Unbreak the build on macOS which was broken by r272858. 2016-07-07 18:14:11 +00:00
BufferOverflowOnInput.cpp [libfuzzer] adding license headers to cpp files 2016-04-01 18:38:58 +00:00
CallerCalleeTest.cpp [libfuzzer] adding license headers to cpp files 2016-04-01 18:38:58 +00:00
CMakeLists.txt [libFuzzer] add hooks for strstr, strcasestr, strcasecmp, strncasecmp 2016-07-15 23:27:19 +00:00
CounterTest.cpp [libfuzzer] adding license headers to cpp files 2016-04-01 18:38:58 +00:00
CustomCrossOverTest.cpp [libfuzzer] custom crossover interface function. 2016-06-07 20:22:15 +00:00
CustomMutatorTest.cpp [libFuzzer] simplify FuzzerInterface.h 2016-05-13 18:04:35 +00:00
dict1.txt
EmptyTest.cpp [libfuzzer] replacing unittest for truncate_units with functional test. 2016-05-25 21:00:17 +00:00
FourIndependentBranchesTest.cpp [libfuzzer] adding license headers to cpp files 2016-04-01 18:38:58 +00:00
FullCoverageSetTest.cpp [libfuzzer] adding license headers to cpp files 2016-04-01 18:38:58 +00:00
fuzzer-customcrossover.test [libfuzzer] custom crossover interface function. 2016-06-07 20:22:15 +00:00
fuzzer-custommutator.test [libfuzzer] splitting fuzzer.test 2016-06-03 18:05:22 +00:00
fuzzer-dfsan.test [LibFuzzer] Disable compiling and running the LibFuzzer dataflow sanitizer tests on Apple platforms. 2016-06-02 05:48:09 +00:00
fuzzer-dict.test [libFuzzer] add a position hint to the dictionary-based mutator 2016-01-07 01:49:35 +00:00
fuzzer-dirs.test [libfuzzer] splitting fuzzer.test 2016-06-03 18:05:22 +00:00
fuzzer-drill.test [libFuzzer] split the tests to run them in parallel, remove one redundant test 2015-12-19 03:35:30 +00:00
fuzzer-fdmask.test [libfuzzer] splitting fuzzer.test 2016-06-03 18:05:22 +00:00
fuzzer-finalstats.test [libfuzzer] splitting fuzzer.test 2016-06-03 18:05:22 +00:00
fuzzer-flags.test [libfuzzer] splitting fuzzer.test 2016-06-03 18:05:22 +00:00
fuzzer-fn-adapter.test [libfuzzer] arbitrary function adapter. 2016-03-03 23:45:29 +00:00
fuzzer-jobs.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
fuzzer-leak.test [libFuzzer] add ThreadedLeakTest 2016-07-15 17:19:43 +00:00
fuzzer-oom-with-profile.test [LibFuzzer] Split the fuzzer-oom.test into two tests. 2016-06-07 21:23:30 +00:00
fuzzer-oom.test [LibFuzzer] Split the fuzzer-oom.test into two tests. 2016-06-07 21:23:30 +00:00
fuzzer-printcovpcs.test [libfuzzer] splitting fuzzer.test 2016-06-03 18:05:22 +00:00
fuzzer-prunecorpus.test [libfuzzer] prune_corpus option for disabling pruning during the load. 2016-06-07 18:16:32 +00:00
fuzzer-runs.test [libfuzzer] splitting fuzzer.test 2016-06-03 18:05:22 +00:00
fuzzer-seed.test [libfuzzer] splitting fuzzer.test 2016-06-03 18:05:22 +00:00
fuzzer-segv.test [libfuzzer] splitting fuzzer.test 2016-06-03 18:05:22 +00:00
fuzzer-singleinputs.test [libFuzzer] make the single-run output more reliable 2016-06-17 13:07:06 +00:00
fuzzer-threaded.test [libFuzzer] use the new chainable malloc hooks instead of the old un-chainable ones, use atomic for malloc/free counters instead of a thread local counter in the main thread. This should make on-the-spot leak detection in libFuzzer more reliable 2016-06-16 20:17:41 +00:00
fuzzer-timeout.test [libFuzzer] try to print correct time in seconds when reporting a timeout. Don't report timeouts while still loading the corpus. 2016-04-18 22:50:39 +00:00
fuzzer-trace-pc.test [LibFuzzer] Disable the `fuzzer-trace-pc.test` test on non-linux platforms. 2016-06-14 19:15:13 +00:00
fuzzer-traces-hooks.test [libFuzzer] add hooks for strstr, strcasestr, strcasecmp, strncasecmp 2016-07-15 23:27:19 +00:00
fuzzer-traces.test [LibFuzzer] Move tests in `fuzzer-traces.test` that require hooks to their own test. 2016-06-14 00:11:34 +00:00
fuzzer-trunc.test [libfuzzer] replacing unittest for truncate_units with functional test. 2016-05-25 21:00:17 +00:00
fuzzer-ubsan.test [libFuzzer] add a test for libFuzzer+ubsan, extend the docs on using libFuzzer+ubsan 2016-05-09 21:02:36 +00:00
fuzzer.test [libFuzzer] add a test that is built w/o coverage instrumentation but has the coverage rt (it should now fail with a descriptive message) 2016-06-08 01:46:13 +00:00
FuzzerFnAdapterUnittest.cpp [libfuzzer] adding license headers to cpp files 2016-04-01 18:38:58 +00:00
FuzzerUnittest.cpp [libFuzzer] add hooks for strstr, strcasestr, strcasecmp, strncasecmp 2016-07-15 23:27:19 +00:00
hi.txt
InitializeTest.cpp [libfuzzer] adding license headers to cpp files 2016-04-01 18:38:58 +00:00
LeakTest.cpp [libFuzzer] added -detect_leaks flag (0 by default for now). When enabled, it will help finding leaks while fuzzing 2016-04-20 00:24:21 +00:00
LeakTimeoutTest.cpp [libfuzzer] adding license headers to cpp files 2016-04-01 18:38:58 +00:00
lit.cfg [LibFuzzer] Split the fuzzer-oom.test into two tests. 2016-06-07 21:23:30 +00:00
lit.site.cfg.in [LibFuzzer] Disable building and running LSan tests on Apple platforms because LSan is not currently supported. 2016-06-07 04:44:39 +00:00
MemcmpTest.cpp [libfuzzer] adding license headers to cpp files 2016-04-01 18:38:58 +00:00
merge.test [libFuzzer] improve -merge functionality 2016-03-18 00:23:29 +00:00
NthRunCrashTest.cpp [libfuzzer] adding license headers to cpp files 2016-04-01 18:38:58 +00:00
NullDerefOnEmptyTest.cpp [libFuzzer] print stats if we crash on empty input 2016-05-25 00:15:36 +00:00
NullDerefTest.cpp [libfuzzer] adding license headers to cpp files 2016-04-01 18:38:58 +00:00
OneHugeAllocTest.cpp [libFuzzer] add one more OOM test, which we currently don't handle very well 2016-06-09 01:20:35 +00:00
OutOfMemoryTest.cpp [libFuzzer] enhance -rss_limit_mb and enable by default. Now it will print the OOM reproducer. 2016-05-06 23:38:07 +00:00
RepeatedMemcmp.cpp [libfuzzer] adding license headers to cpp files 2016-04-01 18:38:58 +00:00
SignedIntOverflowTest.cpp [libFuzzer] add a test for libFuzzer+ubsan, extend the docs on using libFuzzer+ubsan 2016-05-09 21:02:36 +00:00
SimpleCmpTest.cpp [libfuzzer] adding license headers to cpp files 2016-04-01 18:38:58 +00:00
SimpleDictionaryTest.cpp [libfuzzer] adding license headers to cpp files 2016-04-01 18:38:58 +00:00
SimpleFnAdapterTest.cpp [libfuzzer] adding license headers to cpp files 2016-04-01 18:38:58 +00:00
SimpleHashTest.cpp [libfuzzer] adding license headers to cpp files 2016-04-01 18:38:58 +00:00
SimpleTest.cpp [libfuzzer] adding license headers to cpp files 2016-04-01 18:38:58 +00:00
SimpleThreadedTest.cpp [libFuzzer] more refactoring around CurrentUnit. Also add a threading test on which we currently have a race (when reporting bugs from multiple threads) 2016-05-26 22:17:32 +00:00
SpamyTest.cpp [libfuzzer] adding license headers to cpp files 2016-04-01 18:38:58 +00:00
StrcmpTest.cpp [libfuzzer] adding license headers to cpp files 2016-04-01 18:38:58 +00:00
StrncmpTest.cpp [libfuzzer] adding license headers to cpp files 2016-04-01 18:38:58 +00:00
StrstrTest.cpp [libFuzzer] properly intercept memmem 2016-07-19 18:29:06 +00:00
SwitchTest.cpp [libfuzzer] adding license headers to cpp files 2016-04-01 18:38:58 +00:00
ThreadedLeakTest.cpp [libFuzzer] add ThreadedLeakTest 2016-07-15 17:19:43 +00:00
ThreadedTest.cpp [libfuzzer] adding license headers to cpp files 2016-04-01 18:38:58 +00:00
TimeoutTest.cpp [libfuzzer] adding license headers to cpp files 2016-04-01 18:38:58 +00:00
UninstrumentedTest.cpp [libfuzzer] adding license headers to cpp files 2016-04-01 18:38:58 +00:00