summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer/test
Commit message (Collapse)AuthorAgeFilesLines
...
* [libFuzzer] Disable ulimit test on windows.Marcos Pividori2017-02-081-0/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D29535 llvm-svn: 294383
* [libFuzzer] Remove ? wildcard on tests.Marcos Pividori2017-02-081-7/+10
| | | | | | | | We can not use the wildcard ? on Windows. Differential Revision: https://reviews.llvm.org/D29534 llvm-svn: 294382
* [libFuzzer] Update fuzzer-segv to set environment variables.Marcos Pividori2017-02-081-1/+1
| | | | | | | | Use env to set environment variables, so it works on Linux and Windows. Differential Revision: https://reviews.llvm.org/D29533 llvm-svn: 294381
* [libFuzzer] Properly configure tests for Windows.Marcos Pividori2017-02-081-0/+17
| | | | | | | | | | 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
* [libFuzzer] Simplify dump_coverage test.Marcos Pividori2017-02-081-11/+7
| | | | | | | | | | 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
* [libFuzzer] Update Load test to work on 32 bits.Marcos Pividori2017-02-081-1/+1
| | | | | | | | | | 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
* [libFuzzer] Update test to consider different exceptions.Marcos Pividori2017-02-082-2/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D29531 llvm-svn: 294377
* [libFuzzer] Disable afl tests on non-posix systems.Marcos Pividori2017-02-012-0/+4
| | | | | | | | AflDriver is not supported on non posix systems. Differential Revision: https://reviews.llvm.org/D29422 llvm-svn: 293830
* [libFuzzer] Disable equivalence tests on non posix systems.Marcos Pividori2017-02-011-0/+2
| | | | | | | | We can not run this test until we implement shared memory on Windows. Differential Revision: https://reviews.llvm.org/D29421 llvm-svn: 293829
* [libFuzzer] Isolate merge tests that require posix.Marcos Pividori2017-02-012-8/+23
| | | | | | Differential Revision: https://reviews.llvm.org/D29420 llvm-svn: 293828
* [libFuzzer] Add features `windows` and `posix` for lit tests.Marcos Pividori2017-02-013-0/+11
| | | | | | | | | | | | 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
* [libFuzzer] Accept different extensions.Marcos Pividori2017-02-011-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D29417 llvm-svn: 293826
* [libFuzzer] Fix test because cmd prompt does not expand wildcard.Marcos Pividori2017-02-011-1/+1
| | | | | | | | | | 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
* [libFuzzer] increase the default size for shmemKostya Serebryany2017-02-011-1/+1
| | | | llvm-svn: 293722
* [libFuzzer] make shmem more robust in the presence of signalsKostya Serebryany2017-01-271-0/+10
| | | | llvm-svn: 293339
* [libFuzzer] make sure we use the feedback from std::string operator ==Kostya Serebryany2017-01-233-0/+27
| | | | llvm-svn: 292835
* [libFuzzer] deflake a test Kostya Serebryany2017-01-231-0/+1
| | | | llvm-svn: 292813
* [libFuzzer] Add missing dependency for tests.Marcos Pividori2017-01-221-0/+1
| | | | | | Dependency on TestBinaries was erroneously removed on r292735. llvm-svn: 292765
* [libFuzzer] Specify the CRT considered (MT or MD) for tests on Windows.Marcos Pividori2017-01-221-2/+9
| | | | | | Differential Revision: https://reviews.llvm.org/D28439 llvm-svn: 292749
* [libFuzzer] Fix test with shared libraries on Windows.Marcos Pividori2017-01-223-6/+20
| | | | | | | | | | | | | | | | | | We need to set BINARY_DIR to: ${CMAKE_BINARY_DIR}/lib/Fuzzer/test , so the dll is placed in the same directory than the test LLVMFuzzer-DSOTest, and is found when executing that test. As we are using CMAKE_CXX_CREATE_SHARED_LIBRARY to link the dll, we can't modify the output directory for the import library. It will be created in the same directory than the dll (in BINARY_DIR), no matter which value we set to LIBRARY_DIR. So, if we set LIBRARY_DIR to a different directory than BINARY_DIR, when linking LLVMFuzzer-DSOTest, cmake will look for the import library LLVMFuzzer-DSO1.lib in LIBRARY_DIR, and won't find it, since it was created in BINARY_DIR. So, for Windows, we need that LIBRARY_DIR and BINARY_DIR are the same directory. Differential Revision: https://reviews.llvm.org/D27870 llvm-svn: 292748
* [libFuzzer] Leak Sanitizer is not supported for Windows.Marcos Pividori2017-01-221-3/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D28709 llvm-svn: 292745
* [libFuzzer] Fix OutOfMemory tests to work on 32 bits.Marcos Pividori2017-01-222-3/+3
| | | | | | | | | | | | | | | | | I add 2 changes to make the tests work on 32 bits and on 64 bits. I change the size allocated to 0x20000000 and add the flag: -rss_limit_mb=300. Otherwise the output for 32 bits and 64 bits is different. For 64 bits the value 0xff000000 doesn't exceed kMaxAllowedMallocSize. For 32 bits, kMaxAllowedMallocSize is set to 0xc0000000, so the call to Allocate() will fail earlier printing "WARNING: AddressSanitizer failed to allocate ..." , and wont't call malloc hooks. So, we need to consider a size smaller than 2GB (so malloc doesn't fail on 32bits) and greater that the value provided by -rss_limit_mb. Because of that I use: 0x20000000. Differential Revision: https://reviews.llvm.org/D28706 llvm-svn: 292744
* [libFuzzer] Remove lib prefix from library names on tests.Marcos Pividori2017-01-221-2/+2
| | | | | | | | | This changes is necessary on Windows, where libraries doesn't include the prefix "lib". Differential Revision: https://reviews.llvm.org/D28710 llvm-svn: 292742
* [libFuzzer] Consider both possible separators for tests.Marcos Pividori2017-01-221-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D28636 llvm-svn: 292740
* [libFuzzer] Remove optimization flags for tests.Marcos Pividori2017-01-221-11/+1
| | | | | | | | | | | We need to build all the tests with -O0, otherwise optimizations may merge some basic blocks and the tests will fail. In this diff, I simplify the cmake implementation and I remove the flags for Windows too (/O[123s]). Differential Revision: https://reviews.llvm.org/D28632 llvm-svn: 292737
* [libFuzzer] Remove dependencies for tests on Windows.Marcos Pividori2017-01-221-1/+6
| | | | | | | | | | | | Remove dependency on FileCheck, sancov and not for tests on Windows. If LLVM_USE_SANITIZER=Address and LLVM_USE_SANITIZE_COVERAGE=YES, this will trigger the building of dependencies with sanitizer instrumentation. This will fail in Windows, since cmake will use link.exe for linking and won't include compiler-rt libraries. Differential Revision: https://reviews.llvm.org/D27993 llvm-svn: 292735
* [libFuzzer] Disable afl tests for Windows.Marcos Pividori2017-01-221-11/+12
| | | | | | | | On Windows, we don't have interoperability between libFuzzer and afl. Differential Revision: https://reviews.llvm.org/D28355 llvm-svn: 292734
* [libFuzzer] use print+exit(1) instead of assert to report an errorKostya Serebryany2017-01-211-1/+1
| | | | llvm-svn: 292685
* [libFuzzer] re-enable LLVMFuzzer-RepeatedMemcmp test, cleanup the test ↵Kostya Serebryany2017-01-212-20/+15
| | | | | | runner nearby llvm-svn: 292683
* [libFuzzer] Use clang as linker on Windows, to properly include sanitizer ↵Marcos Pividori2017-01-201-0/+15
| | | | | | | | | | | | | | | | | | | libraries. In order to use sanitizers on Windows, we need to link against many runtime libraries which will depend on the target being created (executable or dll) and the c runtime library used (MT/MD). By default, cmake uses link.exe for linking, which fails because we don't specify the appropiate dependencies. As we don't want to consider all of that possible situations which depends on the implementation of the compiler-rt, the simplest option is to change the rules for linking executables and shared libraries, using the compiler instead of link.exe. Clang driver will consider the sanitizer flags, and automatically provide the required libraries to the linker. Differential Revision: https://reviews.llvm.org/D27869 llvm-svn: 292669
* [libFuzzer] Properly use compiler options supported on Windows.Marcos Pividori2017-01-201-1/+1
| | | | | | | | Replace "-g" by "-gline-tables-only". "-g" is not supported by clang-cl. Differential Revision: https://reviews.llvm.org/D27868 llvm-svn: 292668
* [libFuzzer] add an assert to protect against LLVMFuzzerInitialize changing ↵Kostya Serebryany2017-01-203-0/+19
| | | | | | argv[0] llvm-svn: 292652
* [libFuzzer] experimental support for 'equivalance fuzzing'Kostya Serebryany2017-01-203-6/+14
| | | | llvm-svn: 292646
* [libFuzzer] improve -minimize_crash: honor -artifact_prefix= and don't ↵Kostya Serebryany2017-01-193-1/+25
| | | | | | special case 2-byte inputs llvm-svn: 292511
* [libFuzzer] add two tests for experimenting with equivalence fuzzingKostya Serebryany2017-01-193-0/+43
| | | | llvm-svn: 292509
* [libFuzzer] exit(1) on failed mergeKostya Serebryany2017-01-181-0/+4
| | | | llvm-svn: 292319
* [libfuzzer] fixing collected pc addresses for coverageMike Aizatsky2017-01-172-2/+3
| | | | | | | | | | | | Summary: The causes google/ossfuzz#84 Reviewers: kcc Subscribers: mgorny Differential Revision: https://reviews.llvm.org/D28827 llvm-svn: 292289
* [libFuzzer] use table of recent compares for memcmp/strcmp (to unify the ↵Kostya Serebryany2017-01-172-12/+16
| | | | | | code between cmp and memcmp handling) llvm-svn: 292287
* [libFuzzer] improve error handling during the merge (handle various IO failures)Kostya Serebryany2017-01-051-0/+8
| | | | llvm-svn: 291182
* [libFuzzer] make __sanitizer_cov_trace_switch more predictableKostya Serebryany2016-12-291-2/+2
| | | | llvm-svn: 290703
* [libfuzzer] dump_coverage command line flagMike Aizatsky2016-12-191-0/+16
| | | | | | | | Reviewers: kcc, vitalybuka Differential Revision: https://reviews.llvm.org/D27942 llvm-svn: 290138
* [libFuzzer] use less memory for mergeKostya Serebryany2016-12-171-2/+5
| | | | llvm-svn: 290039
* [libFuzzer] remove stale testKostya Serebryany2016-12-171-3/+0
| | | | llvm-svn: 290033
* [libFuzzer] when tracing switch statements, handle only one case at a time ↵Kostya Serebryany2016-12-171-2/+2
| | | | | | (to make things faster). Also ensure that the signals from value profile do not intersect with the regular coverage llvm-svn: 290031
* [libfuzzer] removing experimental FuzzerFnAdapterMike Aizatsky2016-12-173-136/+0
| | | | | | | | | | | | Summary: This is superceded by protobuf mutation work. Reviewers: kcc Subscribers: mgorny Differential Revision: https://reviews.llvm.org/D27865 llvm-svn: 290018
* [libFuzzer] Remove unnecessary includes of posix headers.Marcos Pividori2016-12-163-3/+0
| | | | | | | | | Remove includes of "unistd.h" header, which is missing in non posix systems. Differential Revision: https://reviews.llvm.org/D277300 llvm-svn: 289965
* [libFuzzer] Update tests to use more general functions instead of posix ↵Marcos Pividori2016-12-162-1/+8
| | | | | | | | | | | specific. Replace sleep() posix function by a more portable sleep_for() function from std. Also, ignore memmem() and strcasestr() on Windows. Differential Revision: https://reviews.llvm.org/D27729 llvm-svn: 289964
* [libFuzzer] enable the failure-resistant merge by default (with ↵Kostya Serebryany2016-12-151-12/+20
| | | | | | trace-pc-guard only) llvm-svn: 289772
* [libFuzzer] Fix bug in detecting timeouts when input string is empty.Marcos Pividori2016-12-133-0/+20
| | | | | | | | | | | | | | I added a new flag RunningCB to know if the Fuzzer's main thread is running the CB function, instead of using (!CurrentUnitSize). (!CurrentUnitSize) doesn't work properly. For example, in FuzzerLoop.cpp, inside ShuffleAndMinimize() function, we execute the callback with an empty string (size=0). Previous implementation failed to detect timeouts in that execution. Also, I add a regression test for that case. Differential Revision: https://reviews.llvm.org/D27433 llvm-svn: 289561
* [libFuzzer] don't require extra flags with -minimize_crash=1 (default to ↵Kostya Serebryany2016-12-131-4/+4
| | | | | | -max_total_time=600). Also respect exact_artifact_path when outputting the end result llvm-svn: 289506
OpenPOWER on IntegriCloud