1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00
llvm-mirror/lib/Fuzzer/test
Matt Morehouse 8883497952 Generate error reports when a fuzz target exits.
Summary:
Implements https://github.com/google/sanitizers/issues/835.

Flush stdout before exiting in test cases.

Since the atexit hook is used for exit reports, pending prints to
stdout can be lost if they aren't flushed before calling exit().

Expect tests to have non-zero exit code if exit() is called.

Reviewers: vitalybuka, kcc

Reviewed By: kcc

Subscribers: eraman, llvm-commits, hiraditya

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

llvm-svn: 308669
2017-07-20 20:43:39 +00:00
..
inline-8bit-counters [libFuzzer] initial support of -fsanitize-coverage=inline-8bit-counters in libFuzzer. This is not fully functional yet, but simple tests work 2017-06-13 22:31:21 +00:00
no-coverage [libFuzzer] Use custom target instead of list of binaries for tests. 2017-02-08 00:03:26 +00:00
trace-pc [libFuzzer] initial support of -fsanitize-coverage=inline-8bit-counters in libFuzzer. This is not fully functional yet, but simple tests work 2017-06-13 22:31:21 +00:00
ubsan [libFuzzer] Use custom target instead of list of binaries for tests. 2017-02-08 00:03:26 +00:00
uninstrumented [libFuzzer] Use custom target instead of list of binaries for tests. 2017-02-08 00:03:26 +00:00
unit
AbsNegAndConstant64Test.cpp Generate error reports when a fuzz target exits. 2017-07-20 20:43:39 +00:00
AbsNegAndConstantTest.cpp Generate error reports when a fuzz target exits. 2017-07-20 20:43:39 +00:00
AccumulateAllocationsTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
afl-driver-extra-stats.test [libFuzzer] Disable afl tests on non-posix systems. 2017-02-01 22:40:50 +00:00
afl-driver-stderr.test [libFuzzer] Disable afl tests on non-posix systems. 2017-02-01 22:40:50 +00:00
afl-driver.test [libFuzzer] fix tests on Windows 2017-05-15 22:55:00 +00:00
AFLDriverTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
bad-strcmp.test [libFuzzer] be more careful when calling strlen of strcmp parameters, PR32357 2017-03-24 22:19:52 +00:00
BadStrcmpTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
BogusInitializeTest.cpp [libFuzzer] add an assert to protect against LLVMFuzzerInitialize changing argv[0] 2017-01-20 21:34:24 +00:00
BufferOverflowOnInput.cpp Generate error reports when a fuzz target exits. 2017-07-20 20:43:39 +00:00
caller-callee.test [libFuzzer] simplify two more tests 2017-07-19 23:52:54 +00:00
CallerCalleeTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
cleanse.test [libFuzzer] experimental option -cleanse_crash: tries to replace all bytes in a crash reproducer with garbage, while still preserving the crash 2017-04-17 20:58:21 +00:00
CleanseTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
CMakeLists.txt [libFuzzer] add DeepRecursionTest, inspired by https://guidovranken.wordpress.com/2017/07/08/libfuzzer-gv-new-techniques-for-dramatically-faster-fuzzing/ (Stack-depth-guided fuzzing). libFuzzer does not solve it yet. 2017-07-20 00:37:08 +00:00
CounterTest.cpp
coverage.test Mark some libFuzzer tests as XFAIL'd on Darwin 2017-02-28 21:45:59 +00:00
CustomCrossOverAndMutateTest.cpp [libFuzzer] Reorder includes in test 2017-03-13 23:49:00 +00:00
CustomCrossOverTest.cpp Generate error reports when a fuzz target exits. 2017-07-20 20:43:39 +00:00
CustomMutatorTest.cpp Generate error reports when a fuzz target exits. 2017-07-20 20:43:39 +00:00
cxxstring.test Fuzzer: Mark test/cxxstring.test UNSUPPORTED: windows 2017-04-28 23:59:53 +00:00
CxxStringEqTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
DeepRecursionTest.cpp [libFuzzer] prototype implementation of recursion-depth coverage features (commented out; real implementation needs to use inlined instrumentation) 2017-07-20 01:35:17 +00:00
dict1.txt
disable-leaks.test [libFuzzer] split two tests to get more parallelism in test runs 2017-03-24 00:51:18 +00:00
DivTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
DSO1.cpp [libFuzzer] Fix test with shared libraries on Windows. 2017-01-22 02:28:08 +00:00
DSO2.cpp [libFuzzer] Fix test with shared libraries on Windows. 2017-01-22 02:28:08 +00:00
DSOTestExtra.cpp [libFuzzer] change trace-pc to use 8-byte guards 2016-09-17 05:04:47 +00:00
DSOTestMain.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
dump_coverage.test [libFuzzer] fix a test to match the new sanitizer run-time 2017-05-31 19:47:11 +00:00
EmptyTest.cpp [libfuzzer] replacing unittest for truncate_units with functional test. 2016-05-25 21:00:17 +00:00
equivalence-signals.test [libFuzzer] split two tests to get more parallelism in test runs 2017-03-24 00:51:18 +00:00
equivalence.test [libFuzzer] split two tests to get more parallelism in test runs 2017-03-24 00:51:18 +00:00
EquivalenceATest.cpp [libFuzzer] experimental support for 'equivalance fuzzing' 2017-01-20 20:57:07 +00:00
EquivalenceBTest.cpp [libFuzzer] experimental support for 'equivalance fuzzing' 2017-01-20 20:57:07 +00:00
exit-report.test Generate error reports when a fuzz target exits. 2017-07-20 20:43:39 +00:00
extra-counters.test [libFuzzer] create experimental support for user-provided coverage signal 2017-03-23 22:43:12 +00:00
FlagsTest.cpp [libFuzzer] Allow non-fuzzer args after -ignore_remaining_args=1 2017-07-14 23:33:04 +00:00
FourIndependentBranchesTest.cpp [libFuzzer] change several tests to not limit the max len: with reduce_inputs=1 they are now fast enough even w/o this 2017-07-19 23:45:46 +00:00
FullCoverageSetTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
fuzzer-customcrossover.test [libFuzzer] remove a stale flag from tests, run value-profile-strncmp.test longer (hopefully, will fix the OSX bot) 2017-03-30 04:22:20 +00:00
fuzzer-customcrossoverandmutate.test [libFuzzer] remove a stale flag from tests, run value-profile-strncmp.test longer (hopefully, will fix the OSX bot) 2017-03-30 04:22:20 +00:00
fuzzer-custommutator.test [libfuzzer] splitting fuzzer.test 2016-06-03 18:05:22 +00:00
fuzzer-dict.test
fuzzer-dirs.test [libFuzzer] change the default max_len from 64 to 4096. This will affect cases where libFuzzer is run w/o initial corpus or with a corpus of very small items. 2017-06-15 22:43:40 +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 Generate error reports when a fuzz target exits. 2017-07-20 20:43:39 +00:00
fuzzer-leak.test [libFuzzer] split two tests to get more parallelism in test runs 2017-03-24 00:51:18 +00:00
fuzzer-oom-with-profile.test [libFuzzer] extend -rss_limit_mb to crash instantly on a single malloc that exceeds the limit 2016-11-30 22:39:35 +00:00
fuzzer-oom.test Try to deflake fuzzer-oom.test on Windows 2017-07-20 00:11:39 +00:00
fuzzer-printcovpcs.test Generate error reports when a fuzz target exits. 2017-07-20 20:43:39 +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] Don't replace custom signal handlers. 2017-05-25 01:43:13 +00:00
fuzzer-singleinputs.test [libFuzzer] Accept different extensions. 2017-02-01 22:40:29 +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] Fix bug in detecting timeouts when input string is empty. 2016-12-13 17:46:25 +00:00
fuzzer-traces-hooks.test [libFuzzer] simplify the handling of memmem/strstr 2017-07-14 00:06:27 +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 Generate error reports when a fuzz target exits. 2017-07-20 20:43:39 +00:00
FuzzerUnittest.cpp [libFuzzer] remove stale code 2017-07-15 01:31:40 +00:00
hi.txt
InitializeTest.cpp [libFuzzer] add StandaloneFuzzTargetMain.c and a test for it 2016-10-25 22:30:34 +00:00
inline-8bit-counters.test Generate error reports when a fuzz target exits. 2017-07-20 20:43:39 +00:00
LargeTest.cpp [libFuzzer] add test/LargeTest.cpp, mostly for manual experiments with large number of edges, not yet suitable for unit testing 2017-03-11 01:54:06 +00:00
LeakTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
LeakTimeoutTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
lit.cfg [libFuzzer] Mark a test that infinite loops as unsupported 2017-02-22 23:05:17 +00:00
lit.site.cfg.in [libFuzzer] Add features windows and posix for lit tests. 2017-02-01 22:40:34 +00:00
LoadTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
Memcmp64BytesTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
MemcmpTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
merge-posix.test [libFuzzer] Isolate merge tests that require posix. 2017-02-01 22:40:40 +00:00
merge-summary.test [libFuzzer] add two experimental flags to make corpus merging more scalable: -save_coverage_summary/-load_coverage_summary. This is still WIP, the documentation will come later if these flags survive 2017-03-22 20:32:44 +00:00
merge.test [libFuzzer] Remove ? wildcard on tests. 2017-02-08 00:02:50 +00:00
minimize_crash.test [libFuzzer] honor -exact_artifact_path for all intermediate files during crash minimization (https://github.com/google/oss-fuzz/issues/250) 2017-03-24 21:09:16 +00:00
minimize_two_crashes.test [libFuzzer] Fix test on Windows. 2017-03-25 01:19:45 +00:00
NotinstrumentedTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
NthRunCrashTest.cpp Generate error reports when a fuzz target exits. 2017-07-20 20:43:39 +00:00
NullDerefOnEmptyTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
NullDerefTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
OneHugeAllocTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
OutOfMemorySingleLargeMallocTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
OutOfMemoryTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
overwrite-input.test [libFuzzer] make sure the input data is not overwritten in the fuzz target (if it is -- report an error) 2017-05-09 01:17:29 +00:00
OverwriteInputTest.cpp [libFuzzer] make sure the input data is not overwritten in the fuzz target (if it is -- report an error) 2017-05-09 01:17:29 +00:00
reduce_inputs.test [libFuzzer] make sure CheckExitOnSrcPosOrItem is called after the new input is saved to the corpus 2017-07-20 18:53:25 +00:00
repeated-bytes.test Generate error reports when a fuzz target exits. 2017-07-20 20:43:39 +00:00
RepeatedBytesTest.cpp Generate error reports when a fuzz target exits. 2017-07-20 20:43:39 +00:00
RepeatedMemcmp.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
shrink.test [libFuzzer] change several tests to not limit the max len: with reduce_inputs=1 they are now fast enough even w/o this 2017-07-19 23:45:46 +00:00
ShrinkControlFlowSimpleTest.cpp [libFuzzer] experimental feature -reduce_inputs (off by default) that tries to replace elements in the corpus with smaller ones that have the same feature set. Still needs tuning 2017-07-13 01:08:53 +00:00
ShrinkControlFlowTest.cpp [libFuzzer] change several tests to not limit the max len: with reduce_inputs=1 they are now fast enough even w/o this 2017-07-19 23:45:46 +00:00
ShrinkValueProfileTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
SignedIntOverflowTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
simple-cmp.test [libFuzzer] enable use_cmp by default 2016-10-27 21:44:37 +00:00
SimpleCmpTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
SimpleDictionaryTest.cpp Generate error reports when a fuzz target exits. 2017-07-20 20:43:39 +00:00
SimpleHashTest.cpp [libFuzzer] change several tests to not limit the max len: with reduce_inputs=1 they are now fast enough even w/o this 2017-07-19 23:45:46 +00:00
SimpleTest.cpp Generate error reports when a fuzz target exits. 2017-07-20 20:43:39 +00:00
SimpleThreadedTest.cpp Generate error reports when a fuzz target exits. 2017-07-20 20:43:39 +00:00
SingleByteInputTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
SingleMemcmpTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
SingleStrcmpTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
SingleStrncmpTest.cpp [libFuzzer] change several tests to not limit the max len: with reduce_inputs=1 they are now fast enough even w/o this 2017-07-19 23:45:46 +00:00
SpamyTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
standalone.test [libFuzzer] add StandaloneFuzzTargetMain.c and a test for it 2016-10-25 22:30:34 +00:00
StrcmpTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
StrncmpOOBTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
StrncmpTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
StrstrTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
swap-cmp.test [libFuzzer] enable use_cmp by default 2016-10-27 21:44:37 +00:00
SwapCmpTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
Switch2Test.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
SwitchTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
TableLookupTest.cpp [libFuzzer] initial support of -fsanitize-coverage=inline-8bit-counters in libFuzzer. This is not fully functional yet, but simple tests work 2017-06-13 22:31:21 +00:00
ThreadedLeakTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
ThreadedTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
TimeoutEmptyTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
TimeoutTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
trace-malloc-2.test [libFuzzer] Mark a test that infinite loops as unsupported 2017-02-22 23:05:17 +00:00
trace-malloc.test [libFuzzer] Mark a test that infinite loops as unsupported 2017-02-22 23:05:17 +00:00
trace-pc.test Generate error reports when a fuzz target exits. 2017-07-20 20:43:39 +00:00
TraceMallocTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
TwoDifferentBugsTest.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
ulimit.test Generate error reports when a fuzz target exits. 2017-07-20 20:43:39 +00:00
value-profile-cmp2.test [libFuzzer] split one slow test into several, for more parallel testing 2016-12-12 22:55:25 +00:00
value-profile-cmp3.test [libFuzzer] split one slow test into several, for more parallel testing 2016-12-12 22:55:25 +00:00
value-profile-cmp4.test [libFuzzer] split one slow test into several, for more parallel testing 2016-12-12 22:55:25 +00:00
value-profile-cmp.test [libFuzzer] split one slow test into several, for more parallel testing 2016-12-12 22:55:25 +00:00
value-profile-div.test [libFuzzer] Update test to consider different exceptions. 2017-02-08 00:02:25 +00:00
value-profile-load.test [libFuzzer] enable reduce_inputs=1 by default (seems to be a big win usually) 2017-07-19 22:10:30 +00:00
value-profile-mem.test [libFuzzer] remove stale code 2017-03-14 21:30:14 +00:00
value-profile-set.test [libFuzzer] enable use_cmp by default 2016-10-27 21:44:37 +00:00
value-profile-strcmp.test [libFuzzer] remove a stale flag from tests, run value-profile-strncmp.test longer (hopefully, will fix the OSX bot) 2017-03-30 04:22:20 +00:00
value-profile-strncmp.test [libFuzzer] try to fix value-profile-strncmp on the Mac bot 2017-03-31 00:52:39 +00:00
value-profile-switch.test [libFuzzer] test cleanup 2016-12-10 02:45:56 +00:00