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
a52c8d0daf
[libFuzzer] add a test with two different bugs
...
llvm-svn: 298030
2017-03-17 01:33:16 +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
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
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
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
Marcos Pividori
5a53567620
[libFuzzer] Use long long to ensure 64 bits.
...
We should always use unsigned long long to ensure 64 bits. On Windows, unsigned
long is 4 bytes. This was the reason why value-profile-cmp4.test was failing on
Windows.
Differential Revision: https://reviews.llvm.org/D29617
llvm-svn: 294390
2017-02-08 00:03:31 +00:00
Marcos Pividori
2a318a18db
[libFuzzer] Use custom target instead of list of binaries for tests.
...
Update cmake to use a custom target TestBinaries instead of a list of targets.
This simplifies cmake, and fix some errors. This way, we don't have to propagate
the values into parents directories. We only need to use add_dependencies.
Differential Revision: https://reviews.llvm.org/D29593
llvm-svn: 294389
2017-02-08 00:03:26 +00:00
Marcos Pividori
e219d40191
[libFuzzer] Change Uninstrumented test name.
...
On Windows, executables with the word "uninst" included in their names are
associated with administrator privileges.
Differential Revision: https://reviews.llvm.org/D29549
llvm-svn: 294387
2017-02-08 00:03:13 +00:00
Marcos Pividori
fd6578896d
[libFuzzer] fuzzer-jobs requires posix.
...
llvm-svn: 294386
2017-02-08 00:03:07 +00:00
Marcos Pividori
c7ac33454f
[libFuzzer] Update fuzzer.test to properly set environment variables.
...
Use env to set environment variables, so it works on Windows and Linux.
Differential Revision: https://reviews.llvm.org/D29537
llvm-svn: 294385
2017-02-08 00:03:03 +00:00
Marcos Pividori
992e6308a7
[libFuzzer] Don't add newline character when using echo in tests.
...
Add the option "-n", so we don't add a new line character at the end of the file
when using echo. (on Windows this means 2 characters).
Differential Revision: https://reviews.llvm.org/D29536
llvm-svn: 294384
2017-02-08 00:02:59 +00:00
Marcos Pividori
abcdcf9f86
[libFuzzer] Disable ulimit test on windows.
...
Differential Revision: https://reviews.llvm.org/D29535
llvm-svn: 294383
2017-02-08 00:02:54 +00:00
Marcos Pividori
7444aae914
[libFuzzer] Remove ? wildcard on tests.
...
We can not use the wildcard ? on Windows.
Differential Revision: https://reviews.llvm.org/D29534
llvm-svn: 294382
2017-02-08 00:02:50 +00:00
Marcos Pividori
8fcd6d8394
[libFuzzer] Update fuzzer-segv to set environment variables.
...
Use env to set environment variables, so it works on Linux and Windows.
Differential Revision: https://reviews.llvm.org/D29533
llvm-svn: 294381
2017-02-08 00:02:45 +00:00
Marcos Pividori
509d4f5aa9
[libFuzzer] Properly configure tests for Windows.
...
This configuration is necessary, and is included in all tests suites.
We need to execute: `config.test_format = lit.formats.ShTest(False)`
Otherwise, lit will try to use bash, which generates many problems.
Differential Revision: https://reviews.llvm.org/D29529
llvm-svn: 294380
2017-02-08 00:02:41 +00:00
Marcos Pividori
4a65bc35c3
[libFuzzer] Simplify dump_coverage test.
...
Environment variables are handled differently on Windows. In this case it is not
necessary to use environment variables. So, I simplify the test to work on
Windows.
Differential Revision: https://reviews.llvm.org/D29532
llvm-svn: 294379
2017-02-08 00:02:36 +00:00
Marcos Pividori
638ede81af
[libFuzzer] Update Load test to work on 32 bits.
...
We should ensure the size of the variable `a` is 8 bytes. Otherwise, this
generates a stack buffer overflow inside the memcpy call in 32 bits machines.
(We write more bytes than the size of a, when it is 4 bytes)
Differential Revision: https://reviews.llvm.org/D29602
llvm-svn: 294378
2017-02-08 00:02:32 +00:00
Marcos Pividori
51f907f3a4
[libFuzzer] Update test to consider different exceptions.
...
Differential Revision: https://reviews.llvm.org/D29531
llvm-svn: 294377
2017-02-08 00:02:25 +00:00
Marcos Pividori
ba03abebfe
[libFuzzer] Disable afl tests on non-posix systems.
...
AflDriver is not supported on non posix systems.
Differential Revision: https://reviews.llvm.org/D29422
llvm-svn: 293830
2017-02-01 22:40:50 +00:00
Marcos Pividori
36464dd6a5
[libFuzzer] Disable equivalence tests on non posix systems.
...
We can not run this test until we implement shared memory on Windows.
Differential Revision: https://reviews.llvm.org/D29421
llvm-svn: 293829
2017-02-01 22:40:45 +00:00
Marcos Pividori
b056879700
[libFuzzer] Isolate merge tests that require posix.
...
Differential Revision: https://reviews.llvm.org/D29420
llvm-svn: 293828
2017-02-01 22:40:40 +00:00
Marcos Pividori
9c0244c1eb
[libFuzzer] Add features `windows` and `posix` for lit tests.
...
Add 2 features: posix and windows.
Sometimes we want some specific tests only for posix and we use:
REQUIRES: posix
Sometimes we want some specific tests only for windows and we use:
REQUIRES: windows
Differential Revision: https://reviews.llvm.org/D29418
llvm-svn: 293827
2017-02-01 22:40:34 +00:00
Marcos Pividori
477d153045
[libFuzzer] Accept different extensions.
...
Differential Revision: https://reviews.llvm.org/D29417
llvm-svn: 293826
2017-02-01 22:40:29 +00:00
Marcos Pividori
b340471ff5
[libFuzzer] Fix test because cmd prompt does not expand wildcard.
...
Commands should expand the wildcards on Windows, the cmd prompt doesn't.
Because of that sancov was not finding the needed file.
To deal with this, we use ls and xargs from gnu win utils.
Differential Revision: https://reviews.llvm.org/D29374
llvm-svn: 293825
2017-02-01 22:39:55 +00:00
Kostya Serebryany
5c76e3d034
[libFuzzer] increase the default size for shmem
...
llvm-svn: 293722
2017-02-01 00:07:47 +00:00
Kostya Serebryany
6d58dbb62f
[libFuzzer] make shmem more robust in the presence of signals
...
llvm-svn: 293339
2017-01-27 22:41:30 +00:00
Kostya Serebryany
6bdd8fc5b6
[libFuzzer] make sure we use the feedback from std::string operator ==
...
llvm-svn: 292835
2017-01-23 22:11:04 +00:00
Kostya Serebryany
3230b24ea1
[libFuzzer] deflake a test
...
llvm-svn: 292813
2017-01-23 18:44:40 +00:00
Marcos Pividori
0f84c7aef6
[libFuzzer] Add missing dependency for tests.
...
Dependency on TestBinaries was erroneously removed on r292735.
llvm-svn: 292765
2017-01-22 21:55:46 +00:00
Marcos Pividori
76c58b4413
[libFuzzer] Specify the CRT considered (MT or MD) for tests on Windows.
...
Differential Revision: https://reviews.llvm.org/D28439
llvm-svn: 292749
2017-01-22 02:28:12 +00:00