summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Fuzzer/test
Commit message (Collapse)AuthorAgeFilesLines
...
* [libFuzzer] add one more OOM test, which we currently don't handle very wellKostya Serebryany2016-06-092-0/+30
| | | | llvm-svn: 272240
* [libFuzzer] add a test that is built w/o coverage instrumentation but has ↵Kostya Serebryany2016-06-084-1/+22
| | | | | | the coverage rt (it should now fail with a descriptive message) llvm-svn: 272090
* [LibFuzzer] Declare and use sanitizer functions in ``fuzzer::ExternalFunctions``Dan Liew2016-06-071-0/+21
| | | | | | | | | | | | | | | | | | | | | | | This fixes linking problems on OSX. Unfortunately it turns out we need to use an instance of the ``fuzzer::ExternalFunctions`` object in several places so this commit also replaces all instances with a single global instance. It also turns out initializing a global ``fuzzer::ExternalFunctions`` before main is entered (i.e. letting the object be initialised by the global initializers) is not safe (on OSX the call to ``Printf()`` in the CTOR crashes if it is called from a global initializer) so we instead have a global ``fuzzer::ExternalFunctions*`` and initialize it inside ``FuzzerDriver()``. Multiple unit tests depend also depend on the ``fuzzer::ExternalFunctions*`` global so a ``main()`` function has been added that initializes it before running any tests. Differential Revision: http://reviews.llvm.org/D20943 llvm-svn: 272072
* [LibFuzzer] Split the fuzzer-oom.test into two tests.Dan Liew2016-06-073-1/+14
| | | | | | | | | | This is necessary because the existing fuzzer-oom.test was Linux specific due to its use of __sanitizer_print_memory_profile() which is only available on Linux right now and so the test would fail on OSX. Differential Revision: http://reviews.llvm.org/D20977 llvm-svn: 272061
* [libfuzzer] custom crossover interface function.Mike Aizatsky2016-06-073-0/+68
| | | | | | Differential Revision: http://reviews.llvm.org/D21089 llvm-svn: 272054
* [libfuzzer] prune_corpus option for disabling pruning during the load.Mike Aizatsky2016-06-071-0/+13
| | | | | | | | | | Summary: The option is very useful for testing, plus I intend to measure its effect on fuzzer effectiveness. Differential Revision: http://reviews.llvm.org/D21084 llvm-svn: 272035
* [LibFuzzer] s/dataflow sanitizer/DataflowSanitizer/Dan Liew2016-06-071-2/+2
| | | | llvm-svn: 271980
* [LibFuzzer] Disable building and running LSan tests on Apple platforms ↵Dan Liew2016-06-074-0/+18
| | | | | | | | because LSan is not currently supported. Differential Revision: http://reviews.llvm.org/D20947 llvm-svn: 271979
* [libfuzzer] splitting fuzzer.testMike Aizatsky2016-06-0311-97/+99
| | | | llvm-svn: 271697
* [LibFuzzer] Disable compiling and running the LibFuzzer dataflow sanitizer ↵Dan Liew2016-06-024-1/+19
| | | | | | | | | | | tests on Apple platforms. This fixes a broken part of the build on OSX as the dataflow sanitizer is not supported on OSX yet. Differential Revision: http://reviews.llvm.org/D20894 llvm-svn: 271492
* [libFuzzer] use __sanitizer_print_memory_profile to print the memory profile ↵Kostya Serebryany2016-06-021-0/+1
| | | | | | on OOM llvm-svn: 271465
* [libFuzzer] when an invalid flag is given, warn, but don't crashKostya Serebryany2016-06-011-0/+4
| | | | llvm-svn: 271404
* [libFuzzer] fix a use-after-free (!) in libFuzzer caused by r270905: that CL ↵Kostya Serebryany2016-05-291-4/+7
| | | | | | caused a push_back in the main corpus invalidating the vector<> iterators in rare cases. llvm-svn: 271186
* [libFuzzer] use __sanitizer_set_report_fd with -close_fd_mask. This allows ↵Kostya Serebryany2016-05-271-1/+3
| | | | | | us to keep asan reports when closing target's stderr llvm-svn: 271053
* [LibFuzzer] Refactor declaration of tests in CMake.Dan Liew2016-05-276-115/+104
| | | | | | | | | | | | | | | | | | Add a new CMake function (``add_libfuzzer_test()``) to simplify declaration of executables for testing LibFuzzer and use it to reorganise how tests are declared. Note that configuration of the lit configuration files has been moved as late as possible because we are going to need to disable some tests for some platforms and we will need to propagate this information into the lit configuration. Note the code for custom mains was removed because no tests are currently written for this and Kostya seems happy to remove this. Differential Revision: http://reviews.llvm.org/D20706 llvm-svn: 270958
* [libFuzzer] make check-fuzzer a bit fasterKostya Serebryany2016-05-271-3/+2
| | | | llvm-svn: 270947
* [libFuzzer] more refactoring: make sure CurrentUnitData is awlays a valid ↵Kostya Serebryany2016-05-271-0/+3
| | | | | | pointer to read from llvm-svn: 270942
* [libFuzzer] more refactoring around CurrentUnit. Also add a threading test ↵Kostya Serebryany2016-05-263-2/+26
| | | | | | on which we currently have a race (when reporting bugs from multiple threads) llvm-svn: 270929
* [LibFuzzer] Allow LibFuzzer to be built in modes other than RELEASE.Dan Liew2016-05-266-12/+35
| | | | | | | | | | | | Previously the flags were only being set correctly when the build type was "Release". Now the build should work properly for all the supported build types. When building libFuzzer the optimization level respects whatever is used for the rest of LLVM but for the LibFuzzer tests we force -O0. Differential Revision: http://reviews.llvm.org/D20558 llvm-svn: 270912
* [libFuzzer] when there is a leak in the existing corpus report the ↵Kostya Serebryany2016-05-261-1/+1
| | | | | | reproducer properly llvm-svn: 270905
* [libFuzzer] reimplement the way we do -only_ascii to allow more 'const' in ↵Kostya Serebryany2016-05-261-0/+3
| | | | | | function declarations. Add a test for -only_ascii. NFC intended llvm-svn: 270900
* [libfuzzer] replacing unittest for truncate_units with functional test.Mike Aizatsky2016-05-254-22/+22
| | | | | | Differential Revision: http://reviews.llvm.org/D20641 llvm-svn: 270755
* [libFuzzer] print stats if we crash on empty inputKostya Serebryany2016-05-253-0/+23
| | | | llvm-svn: 270639
* [libfuzzer] Trying random unit prefixes during corpus load.Mike Aizatsky2016-05-241-0/+22
| | | | | | Differential Revision: http://reviews.llvm.org/D20301 llvm-svn: 270632
* [libFuzzer] print the file name before executing the input so that if there ↵Kostya Serebryany2016-05-131-2/+2
| | | | | | is a crash we know which files has caused it llvm-svn: 269450
* [libFuzzer] simplify FuzzerInterface.hKostya Serebryany2016-05-131-1/+1
| | | | llvm-svn: 269448
* [libFuzzer] add a test for libFuzzer+ubsan, extend the docs on using ↵Kostya Serebryany2016-05-094-0/+56
| | | | | | libFuzzer+ubsan llvm-svn: 268968
* [libFuzzer] enhance -rss_limit_mb and enable by default. Now it will print ↵Kostya Serebryany2016-05-063-0/+36
| | | | | | the OOM reproducer. llvm-svn: 268821
* [libFuzzer] print stats after running individual inputsKostya Serebryany2016-05-041-0/+4
| | | | llvm-svn: 268547
* [libFuzzer] enable detect_leaks=1, add proper docsKostya Serebryany2016-04-291-1/+1
| | | | llvm-svn: 268088
* [libFuzzer] disable leak detection if we have tried it for 1000 times w/o ↵Kostya Serebryany2016-04-271-1/+2
| | | | | | finding a leak [part 2] llvm-svn: 267771
* [libFuzzer] disable leak detection if we have tried it for 1000 times w/o ↵Kostya Serebryany2016-04-272-0/+18
| | | | | | finding a leak llvm-svn: 267770
* [libFuzzer] added -detect_leaks flag (0 by default for now). When enabled, ↵Kostya Serebryany2016-04-202-4/+21
| | | | | | it will help finding leaks while fuzzing llvm-svn: 266838
* [libFuzzer] try to print correct time in seconds when reporting a timeout. ↵Kostya Serebryany2016-04-181-1/+1
| | | | | | Don't report timeouts while still loading the corpus. llvm-svn: 266693
* [libFuzzer] warn if the corpus is emptyKostya Serebryany2016-04-181-0/+1
| | | | llvm-svn: 266670
* [libFuzzer] add a better warning for command line flags with -- (two dashes)Kostya Serebryany2016-04-151-0/+2
| | | | llvm-svn: 266480
* [libfuzzer] adding license headers to cpp filesMike Aizatsky2016-04-0127-0/+81
| | | | | | Differential Revision: http://reviews.llvm.org/D18705 llvm-svn: 265174
* [libFuzzer] don't report memory leaks if we are dying due to a timeout (just ↵Kostya Serebryany2016-03-244-4/+24
| | | | | | use _Exit instead of exit in the timeout callback) llvm-svn: 264237
* [libFuzzer] add a flag close_fd_mask so that we can silence spammy targets ↵Kostya Serebryany2016-03-183-0/+48
| | | | | | by closing stderr/stdout llvm-svn: 263831
* [libFuzzer] read corpus dirs recursivelyKostya Serebryany2016-03-181-0/+9
| | | | llvm-svn: 263773
* [libFuzzer] improve -merge functionalityKostya Serebryany2016-03-182-15/+16
| | | | llvm-svn: 263769
* [libFuzzer] deprecate several flagsKostya Serebryany2016-03-172-2/+2
| | | | llvm-svn: 263739
* [libfuzzer] adding std:string to allowed adaptable argument.Mike Aizatsky2016-03-041-0/+9
| | | | llvm-svn: 262757
* [libfuzzer] arbitrary function adapter.Mike Aizatsky2016-03-034-0/+124
| | | | | | | | | The adapter automates converting sequence of bytes into arbitrary arguments. Differential Revision: http://reviews.llvm.org/D17829 llvm-svn: 262673
* [libFuzzer] add generic signal handlers so that libFuzzer can report at ↵Kostya Serebryany2016-03-012-1/+5
| | | | | | least something if ASan is not handlig the signals for us. Remove abort_on_timeout flag. llvm-svn: 262415
* [libFuzzer] fixing the botKostya Serebryany2016-02-271-1/+1
| | | | llvm-svn: 262106
* [libFuzzer] speedup path coverage handlingKostya Serebryany2016-02-271-0/+1
| | | | llvm-svn: 262102
* [libFuzzer] add -print_final_stats=1 flagKostya Serebryany2016-02-261-0/+8
| | | | llvm-svn: 262084
* [libFuzzer] initial implementation of path coverage based on ↵Kostya Serebryany2016-02-263-0/+27
| | | | | | -fsanitize-coverage=trace-pc. This does not scale well yet, but already cracks FullCoverageSetTest in seconds llvm-svn: 262073
* [libFuzzer] fix the libFuzzer bot Kostya Serebryany2016-02-181-1/+1
| | | | llvm-svn: 261184
OpenPOWER on IntegriCloud