Reid Kleckner
67cecd1e1c
[Fuzzer] Flush std::cout before aborting in CxxStringEqTest
...
On Windows, abort() does not appear to flush std::cout. Should fix red
sanitizer-windows bot.
llvm-svn: 299398
2017-04-03 23:00:25 +00:00
Kostya Serebryany
a617e16ff1
[libFuzzer] simplify the code a bit
...
llvm-svn: 299180
2017-03-31 04:17:45 +00:00
Kostya Serebryany
7de1f1a826
[libFuzzer] tests: don't test 64-bit comparison on 32-bit builds
...
llvm-svn: 299179
2017-03-31 03:51:40 +00:00
Kostya Serebryany
b1f802cf80
[libFuzzer] ensure that strncmp is not inlined in a test
...
llvm-svn: 299177
2017-03-31 03:34:33 +00:00
Kostya Serebryany
af2dfce683
[libFuzzer] make sure we don't execute libFuzzer's mem* and str* hooks while calling mem*/str* inside libFuzzer itself
...
llvm-svn: 299167
2017-03-31 02:21:28 +00:00
Kostya Serebryany
3033065df9
[libFuzzer] try to fix value-profile-strncmp on the Mac bot
...
llvm-svn: 299145
2017-03-31 00:52:39 +00:00
Kostya Serebryany
01ddc1cfd5
[libFuzzer] remove a stale flag from tests, run value-profile-strncmp.test longer (hopefully, will fix the OSX bot)
...
llvm-svn: 299051
2017-03-30 04:22:20 +00:00
Kostya Serebryany
d7d1d517ee
[libFuzzer] best effort support for -fsanitize-coverage=trace-pc instrumentation. It is less efficient and precise than -fsanitize-coverage=trace-pc-guard, but still works
...
llvm-svn: 299046
2017-03-30 01:27:20 +00:00
Juergen Ributzka
dea6379421
[libfuzzer] Remove XFAIL for OutOfMemory test.
...
This test is now passing on Darwin.
See rdar://problem/31282257.
llvm-svn: 298886
2017-03-27 22:33:05 +00:00
Vitaly Buka
72b8acfb70
[libFuzzer] Fix test on Windows.
...
llvm-svn: 298757
2017-03-25 01:19:45 +00:00
Kostya Serebryany
86e630b857
[libFuzzer] read asan's dedup_token while minimizing a crash and stop minimization if another bug was found during minimization ( https://github.com/google/oss-fuzz/issues/452 )
...
llvm-svn: 298755
2017-03-25 00:56:08 +00:00
Kostya Serebryany
c58982d6fa
[libFuzzer] be more careful when calling strlen of strcmp parameters, PR32357
...
llvm-svn: 298746
2017-03-24 22:19:52 +00:00
Kostya Serebryany
dba9ded61f
[libFuzzer] honor -exact_artifact_path for all intermediate files during crash minimization ( https://github.com/google/oss-fuzz/issues/250 )
...
llvm-svn: 298740
2017-03-24 21:09:16 +00:00
Kostya Serebryany
e54785c6e9
[libFuzzer] split two tests to get more parallelism in test runs
...
llvm-svn: 298673
2017-03-24 00:51:18 +00:00
Kostya Serebryany
382730ab23
[libFuzzer] increase kFeatureSetSize to 2^21 and make InputCorpus scale to that size. This will potentially make libFuzzer more sensitive on targets with lots of signals
...
llvm-svn: 298671
2017-03-24 00:45:15 +00:00
Kostya Serebryany
5f25495c4d
[libFuzzer] fix non-linux build
...
llvm-svn: 298666
2017-03-23 23:48:47 +00:00
Kostya Serebryany
6ca44f9161
[libFuzzer] create experimental support for user-provided coverage signal
...
llvm-svn: 298654
2017-03-23 22:43:12 +00:00
Kostya Serebryany
4fc6dd7f8f
[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
...
llvm-svn: 298548
2017-03-22 20:32:44 +00:00
Kostya Serebryany
7acabdc497
[libFuzzer] inline the code of __sanitizer_cov_trace_pc_guard into it
...
llvm-svn: 298032
2017-03-17 01:45:15 +00:00
Kostya Serebryany
f7e610eda1
[libFuzzer] Experimenting with dictionary minimization.
...
Summary:
Tracking issue: https://github.com/google/oss-fuzz/issues/331
Reviewers: kcc
Reviewed By: kcc
Differential Revision: https://reviews.llvm.org/D30940
llvm-svn: 298031
2017-03-17 01:40:09 +00:00
Kostya Serebryany
a52c8d0daf
[libFuzzer] add a test with two different bugs
...
llvm-svn: 298030
2017-03-17 01:33:16 +00:00
Kostya Serebryany
63689ca031
[libFuzzer] add a dummy LLVMFuzzerMutate to afl/afl_driver.cpp ( https://github.com/google/oss-fuzz/issues/460 )
...
llvm-svn: 297919
2017-03-15 23:54:40 +00:00
Kostya Serebryany
6d5412596c
[libFuzzer] call __sanitizer_print_memory_profile with two params
...
llvm-svn: 297916
2017-03-15 23:27:53 +00:00
Vitaly Buka
fbf031f27b
Revert "[libFuzzer] Use ChooseUnitIdxToMutate to pick item for crossover."
...
Fails LLVMFuzzer.LLVMFuzzer.value-profile-strncmp.test.
This reverts commit r297891.
llvm-svn: 297912
2017-03-15 23:08:18 +00:00
Vitaly Buka
b99247e608
[libFuzzer] Use ChooseUnitIdxToMutate to pick item for crossover.
...
Differential Revision: https://reviews.llvm.org/D30683
llvm-svn: 297891
2017-03-15 20:59:27 +00:00
Kostya Serebryany
70240430d9
[libFuzzer] remove even more stale code
...
llvm-svn: 297797
2017-03-15 00:39:06 +00:00
Kostya Serebryany
862a845aa5
[libFuzzer] simplify code a bit
...
llvm-svn: 297796
2017-03-15 00:34:25 +00:00
Kostya Serebryany
f81cc098ca
[libFuzzer] remove more stale code
...
llvm-svn: 297785
2017-03-14 21:47:52 +00:00
Kostya Serebryany
24d0016bbd
[libFuzzer] don't clear Counters in TracePC::CollectFeatures since they will be cleared anyway in ResetMaps
...
llvm-svn: 297783
2017-03-14 21:40:53 +00:00
Kostya Serebryany
a43a299382
[libFuzzer] remove stale code
...
llvm-svn: 297781
2017-03-14 21:30:14 +00:00
Vitaly Buka
0c736d8b36
[libFuzzer] Reorder includes in test
...
llvm-svn: 297692
2017-03-13 23:49:00 +00:00
Vitaly Buka
27441e5c47
[libFuzzer] Fix compilation of CustomCrossOverAndMutateTest on Windows
...
llvm-svn: 297690
2017-03-13 23:46:30 +00:00
Kostya Serebryany
d481e1c361
[libFuzzer] add more iterations to LLVMFuzzer-Memcmp64BytesTest
...
llvm-svn: 297554
2017-03-11 05:14:49 +00:00
Kostya Serebryany
5dfa9642a8
[libFuzzer] reduce the number of vector resizes during merge ( https://github.com/google/oss-fuzz/issues/445 )
...
llvm-svn: 297551
2017-03-11 02:50:47 +00:00
Kostya Serebryany
81d1744519
[libFuzzer] print how much memory is consumed by the outer merge process ( https://github.com/google/oss-fuzz/issues/445 )
...
llvm-svn: 297546
2017-03-11 02:26:20 +00:00
Kostya Serebryany
b6b2f18ea8
[libFuzzer] add test/LargeTest.cpp, mostly for manual experiments with large number of edges, not yet suitable for unit testing
...
llvm-svn: 297544
2017-03-11 01:54:06 +00:00
Kostya Serebryany
7939ee4d51
[libFuzzer] remove fuzzer-jobs.test which is flaky and not very useful
...
llvm-svn: 297543
2017-03-11 01:48:54 +00:00
Vitaly Buka
91266b4752
[fuzzer] Don't crash if LLVMFuzzerMutate was called by CustomCrossOver
...
Reviewers: kcc
Subscribers: llvm-commits, mgorny
Differential Revision: https://reviews.llvm.org/D30682
llvm-svn: 297202
2017-03-07 20:37:38 +00:00
Kuba Mracek
00c7592a6b
Un-XFAIL Fuzzer/test/dump_coverage.test. This now passes on Darwin (after r297094).
...
llvm-svn: 297110
2017-03-07 01:01:38 +00:00
Mike Aizatsky
15492af547
[libfuzzer] do not use xargs for shell expansion
...
Summary:
After https://reviews.llvm.org/rL296904 xargs shouldn't be necesssary.
Differential Revision: https://reviews.llvm.org/D30371
llvm-svn: 297094
2017-03-06 23:42:14 +00:00
Mehdi Amini
6dabadab78
un-Xfail Fuzzer test that decided to pass on Green Dragon
...
It may be flacky, I'll turn it into unsupported if it fails again.
llvm-svn: 296913
2017-03-03 21:28:05 +00:00
Kostya Serebryany
41e7a27811
[libFuzzer] remove usage of the old coverage instrumentation
...
llvm-svn: 296536
2017-02-28 23:23:48 +00:00
Mehdi Amini
1d9f3fe77c
Mark some libFuzzer tests as XFAIL'd on Darwin
...
We're bringing up a bot on Green Dragon right now:
http://green.lab.llvm.org/green/view/Experimental/job/libFuzzer
llvm-svn: 296526
2017-02-28 21:45:59 +00:00
Justin Bogner
d519a92a27
[libFuzzer] Update traces hooks test after r293741
...
This test now passes on darwin.
llvm-svn: 295902
2017-02-22 23:12:36 +00:00
Justin Bogner
59c8420018
[libFuzzer] Mark a test that infinite loops as unsupported
...
We need to investigate this, but for now it just causes too much
headache when trying to run these tests.
llvm-svn: 295900
2017-02-22 23:05:17 +00:00
Kostya Serebryany
32c5004cf5
[libFuzzer] increase the size of FixedWord from 27 to 64, see PR31950
...
llvm-svn: 295117
2017-02-14 23:02:37 +00:00
Kostya Serebryany
ae579a79c0
Use "%zd" format specifier for printing number of testcases executed.
...
Summary:
This helps to avoid signed integer overflow after running a fast fuzz target for several hours, e.g.:
<...>
Done -1097903291 runs in 54001 second(s)
Reviewers: kcc
Reviewed By: kcc
Differential Revision: https://reviews.llvm.org/D29941
llvm-svn: 295112
2017-02-14 22:14:36 +00:00
Marcos Pividori
e81f9cc63d
[libFuzzer] Use stoull instead of stol to ensure 64 bits.
...
Differential revision: https://reviews.llvm.org/D29831
llvm-svn: 294769
2017-02-10 18:44:14 +00:00
Eric Fiselier
87c87f4c30
[CMake] Fix pthread handling for out-of-tree builds
...
LLVM defines `PTHREAD_LIB` which is used by AddLLVM.cmake and various projects
to correctly link the threading library when needed. Unfortunately
`PTHREAD_LIB` is defined by LLVM's `config-ix.cmake` file which isn't installed
and therefore can't be used when configuring out-of-tree builds. This causes
such builds to fail since `pthread` isn't being correctly linked.
This patch attempts to fix that problem by renaming and exporting
`LLVM_PTHREAD_LIB` as part of`LLVMConfig.cmake`. I renamed `PTHREAD_LIB`
because It seemed likely to cause collisions with downstream users of
`LLVMConfig.cmake`.
llvm-svn: 294690
2017-02-10 01:59:20 +00:00
Marcos Pividori
a0b23b8e63
[libFuzzer] Export external functions on tests.
...
We need to export external functions so they are found when calling
GetProcAddress() on Windows. But we can't use `__declspec(dllexport)` because
we want the targets to be completely independent from the fuzz engines and don't
depend on other header files. Also, we don't want to include platform specific
code managed with conditional macros.
So, the solution is to add the exported symbols with linker flags in cmake.
Differential revision: https://reviews.llvm.org/D29752
llvm-svn: 294688
2017-02-10 01:40:28 +00:00