summaryrefslogtreecommitdiff
path: root/test/fuzzer
AgeCommit message (Collapse)Author
2017-12-15[libFuzzer] make the tests depend on ubsanKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@320787 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-12[libFuzzer] change the strategy for -experimental_len_control to grow ↵Kostya Serebryany
max_len slower git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@320531 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-09[libFuzzer] even less aggressive step function for stack depth. Also don't ↵Kostya Serebryany
use asan in one test to speed it up git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@320259 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01[libFuzzer] add a flag -malloc_limit_mbKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@319590 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-17[libFuzzer] Fix flaky merge.test.Matt Morehouse
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@318475 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16[libFuzzer] Make merge-sigusr.test work on Mac.Matt Morehouse
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@318465 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16[libFuzzer] add more tests for mergeKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@318453 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-16[libFuzzer] disable test/fuzzer/merge-sigusr.test on Mac while investigating ↵Kostya Serebryany
the bot failure git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@318376 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-15[libFuzzer] respect max_len during mergeKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@318302 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-10[libFuzzer] trying to make sigusr tests more reliableKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317852 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-10[libFuzzer] split a test into two Kostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317851 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-09[libFuzzer] use pkill instead of killall in a test since the bots don't have ↵Kostya Serebryany
killall git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317840 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-09[libFuzzer] make sure to flush IO when done merging one fileKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317835 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-09[libFuzzer] Don't add leaking inputs to corpus.Matt Morehouse
Reviewers: kcc Reviewed By: kcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D39850 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317831 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-09[libFuzzer] handle SIGUSR1/SIGUSR2 and try to exit grafully on these signalsKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317829 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-09[libFuzzer] allow merge to resume after being preempted Kostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317767 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-09[libFuzzer] mechanically simplify a test, NFCKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317756 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-09[libFuzzer] fix a test (and hopefully, the bot)Kostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317749 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-09[libFuzzer] allow user to specify the merge control fileKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317747 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-01[fuzzer] Script to detect unbalanced allocation in -trace_malloc outputVitaly Buka
Reviewers: kcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D39466 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317119 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-01[fuzzer] Fix threaded stack printingVitaly Buka
Reviewers: kcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D39397 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317071 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-01Revert "[fuzzer] Fix threaded stack printing and nested mallocs"Vitaly Buka
Fails on darwin Revert "[fuzzer] Script to detect unbalanced allocation in -trace_malloc output" Needs previous one. This reverts commit r317034, r317036. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317061 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-31[fuzzer] Script to detect unbalanced allocation in -trace_malloc outputVitaly Buka
Reviewers: kcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D39466 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317036 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-31[fuzzer] Fix threaded stack printing and nested mallocsVitaly Buka
Summary: Nested mallocs are possible with internal symbolizer. Reviewers: kcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D39397 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317034 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-25[libFuzzer] trying to make a test more stable on MacKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@316627 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-13[libFuzzer] tweam use_feature_frequency to be less aggressive; run a dummy ↵Kostya Serebryany
input before the seed corpus git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315657 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-05[libFuzzer] Disable experimental clang coverage support by default.Max Moroz
Summary: It can be enabled via "-use_clang_coverage=1" flag. Reason for disabling: libFuzzer resets Clang Counters and makes it impossible to generate coverage report for a regular fuzz target (i.e. not standalone build). Reviewers: kcc Reviewed By: kcc Subscribers: kcc Differential Revision: https://reviews.llvm.org/D38604 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315029 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-15[libFuzzer] add linux-specific test for gc-sectionsKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313421 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-15[libFuzzer] test fixKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313411 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-12[libFuzzer] Fix lit files to make running tests more straightforward on Mac OS.Max Moroz
Summary: Current implementation does not work if CMAKE_OSX_SYSROOT is not specified. It silently generates invalid command with the following flags: `-std=c++11 -lc++ -gline-tables-only -isysroot -fsanitize=address,fuzzer` and then fails with the following error: ``` warning: no such sysroot directory: '-fsanitize=address,fuzzer' [-Wmissing-sysroot]" <...>/RepeatedBytesTest.cpp:5:10: fatal error: 'assert.h' file not found #include <assert.h> ^~~~~~~~~~ 1 error generated. ``` However, if you have Command Line Tools installed, you have '/usr/include' dir. In that case, it is not necessary to specify isysroot path. Also, with the patch, in case of '/usr/include' does not exist, the '-sysroot' path would be resolved automatically in compiler-rt/cmake/base-config-ix.cmake. For more context, see the comment at `compiler-rt/cmake/base-config-ix.cmake#L76` Reviewers: kcc, george.karpenkov Reviewed By: kcc, george.karpenkov Differential Revision: https://reviews.llvm.org/D37721 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313033 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-12[libfuzzer] Compare TotalNumberOfRuns with MaxNumberOfRuns when testing a ↵Max Moroz
memory leak. Summary: Fuzzer::TryDetectingAMemoryLeak may call ExecuteCallback which would increment TotalNumberOfRuns, but it doesn't respect Options.MaxNumberOfRuns value specified by a user. Context: https://github.com/google/oss-fuzz/issues/822#issuecomment-328153970 Reviewers: kcc Reviewed By: kcc Differential Revision: https://reviews.llvm.org/D37632 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@312993 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-07[libFuzzer] simplify CustomCrossOverTest even moreKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@312697 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-07[libFuzzer] simplify CustomCrossOverTest a bit moreKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@312695 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-07[libFuzzer] simplify and re-enable CustomCrossOverTestKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@312689 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-05[libFuzzer] remporary disable an unstable testKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@312593 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01[libFuzzer] use more iterations for a testKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@312356 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-01[libFuzzer] Enable 8-bit counters test on macOSGeorge Karpenkov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@312339 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-30[SanitizeCoverage] Enable stack-depth coverage for -fsanitize=fuzzerMatt Morehouse
Summary: - Don't sanitize __sancov_lowest_stack. - Don't instrument leaf functions. - Add CoverageStackDepth to Fuzzer and FuzzerNoLink. - Only enable on Linux. Reviewers: vitalybuka, kcc, george.karpenkov Reviewed By: kcc Subscribers: kubamracek, cfe-commits, llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D37156 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@312185 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-29Revert "[SanitizeCoverage] Enable stack-depth coverage for -fsanitize=fuzzer"Matt Morehouse
This reverts r312026 due to bot breakage. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@312047 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-29[libFUzzer] change the way we load the seed corpora: instead of loading all ↵Kostya Serebryany
files and these executing all files, load and execute them one-by-one. This should reduce the memory usage in many cases git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@312033 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-29[SanitizeCoverage] Enable stack-depth coverage for -fsanitize=fuzzerMatt Morehouse
Summary: - Don't sanitize __sancov_lowest_stack. - Don't instrument leaf functions. - Add CoverageStackDepth to Fuzzer and FuzzerNoLink. - Disable stack depth tracking on Mac. Reviewers: vitalybuka, kcc, george.karpenkov Reviewed By: kcc Subscribers: kubamracek, cfe-commits, llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D37156 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@312026 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-28[libFuzzer] allow -print_funcs=N: N is the max number of new covered ↵Kostya Serebryany
function printed git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@311945 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-28[libFuzzer] Exclude a test failing on OS X.George Karpenkov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@311916 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-25Revert "[SanitizeCoverage] Enable stack-depth coverage for -fsanitize=fuzzer"Matt Morehouse
This reverts r311801 due to a bot failure. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@311803 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-25[SanitizeCoverage] Enable stack-depth coverage for -fsanitize=fuzzerMatt Morehouse
Summary: - Don't sanitize __sancov_lowest_stack. - Don't instrument leaf functions. - Add CoverageStackDepth to Fuzzer and FuzzerNoLink. Reviewers: vitalybuka, kcc Reviewed By: kcc Subscribers: cfe-commits, llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D37156 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@311801 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-25[libFuzzer] prepare tests for switching from ↵Kostya Serebryany
-fsanitize-coverage=trace-pc-guard to -fsanitize-coverage=inline-8bit-counters git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@311798 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-25[libFuzzer] add -print_funcs=1 (on bey default): print newly discovered ↵Kostya Serebryany
functions during fuzzing git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@311797 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-25[sanitizer-coverage] extend fsanitize-coverage=pc-table with flags for every PCKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@311794 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-22[SanitizerCoverage] Optimize stack-depth instrumentation.Matt Morehouse
Summary: Use the initialexec TLS type and eliminate calls to the TLS wrapper. Fixes the sanitizer-x86_64-linux-fuzzer bot failure. Reviewers: vitalybuka, kcc Reviewed By: kcc Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D37026 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@311490 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-22[libFuzzer] disable a test failing on the botKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@311427 91177308-0d34-0410-b5e6-96231b3b80d8