summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test
Commit message (Collapse)AuthorAgeFilesLines
...
* [libFuzzer] Implement stat::stability_rate based on the percentage of ↵Max Moroz2018-07-162-0/+72
| | | | | | | | | | | | | | | | | | | | | unstable edges. Summary: Created a -print_unstable_stats flag. When -print_unstable_stats=1, we run it 2 more times on interesting inputs poisoning unstable edges in an array. On program termination, we run PrintUnstableStats() which will print a line with a stability percentage like AFL does. Patch by Kyungtak Woo (@kevinwkt). Reviewers: metzman, Dor1s, kcc, morehouse Reviewed By: metzman, Dor1s, morehouse Subscribers: delcypher, llvm-commits, #sanitizers, kcc, morehouse, Dor1s Differential Revision: https://reviews.llvm.org/D49212 llvm-svn: 337187
* Revert r337175 (https://reviews.llvm.org/D49212) due to unintentional format ↵Max Moroz2018-07-162-72/+0
| | | | | | changes. llvm-svn: 337180
* [libFuzzer] Implement stat::stability_rate based on the percentage of ↵Max Moroz2018-07-162-0/+72
| | | | | | | | | | | | | | | | | | | | | unstable edges. Summary: Created a -print_unstable_stats flag. When -print_unstable_stats=1, we run it 2 more times on interesting inputs poisoning unstable edges in an array. On program termination, we run PrintUnstableStats() which will print a line with a stability percentage like AFL does. Patch by Kyungtak Woo (@kevinwkt). Reviewers: metzman, Dor1s, kcc, morehouse Reviewed By: metzman, Dor1s, morehouse Subscribers: delcypher, llvm-commits, #sanitizers, kcc, morehouse, Dor1s Differential Revision: https://reviews.llvm.org/D49212 llvm-svn: 337175
* [gcov] Add a test showing differences in line counts when building with or ↵Marco Castelluccio2018-07-163-0/+48
| | | | | | | | without exceptions enabled. Test for https://bugs.llvm.org/show_bug.cgi?id=38066. llvm-svn: 337174
* Add a test with __gcov_flush called before terminating the program.Marco Castelluccio2018-07-163-0/+43
| | | | | | Test for https://bugs.llvm.org/show_bug.cgi?id=38067. llvm-svn: 337150
* [UBSan] Followup for silence_unsigned_overflow flag to handle negate overflows.Max Moroz2018-07-131-1/+3
| | | | | | | | | | | | | | | | | | | | Summary: That flag has been introduced in https://reviews.llvm.org/D48660 for suppressing UIO error messages in an efficient way. The main motivation is to be able to use UIO checks in builds used for fuzzing as it might provide an interesting signal to a fuzzing engine such as libFuzzer. See https://github.com/google/oss-fuzz/issues/910 for more information. Reviewers: morehouse, kcc Reviewed By: morehouse Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D49324 llvm-svn: 337068
* Add a test with multiple BBs on the same lineMarco Castelluccio2018-07-133-0/+67
| | | | | | Test for https://bugs.llvm.org/show_bug.cgi?id=38065. llvm-svn: 336996
* Remove `tsan/Darwin/gcd-after-null.mm` test.Dan Liew2018-07-131-23/+0
| | | | | | | | | | | | | | | | | Summary: This test invokes undocumented behaviour that could change in the future. Given this, it's probably best to just remove the test. rdar://problem/42022283 Reviewers: kubamracek Subscribers: llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D49269 llvm-svn: 336977
* [XRay][compiler-rt] Add PID field to llvm-xray tool and add PID metadata ↵Dean Michael Berris2018-07-134-31/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | record entry in FDR mode Summary: llvm-xray changes: - account-mode - process-id {...} shows after thread-id - convert-mode - process {...} shows after thread - parses FDR and basic mode pid entries - Checks version number for FDR log parsing. Basic logging changes: - Update header version from 2 -> 3 FDR logging changes: - Update header version from 2 -> 3 - in writeBufferPreamble, there is an additional PID Metadata record (after thread id record and tsc record) Test cases changes: - fdr-mode.cc, fdr-single-thread.cc, fdr-thread-order.cc modified to catch process id output in the log. Reviewers: dberris Reviewed By: dberris Subscribers: hiraditya, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D49153 llvm-svn: 336974
* [XRay][compiler-rt] Profiling Mode: Flush logs on exitDean Michael Berris2018-07-132-2/+2
| | | | | | | | | | | | | | | | | Summary: This change adds support for writing out profiles at program exit. Depends on D48653. Reviewers: kpw, eizan Reviewed By: kpw Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D48956 llvm-svn: 336969
* [fuzzer] [tests] Increase the number of iterations for three-bytes.testGeorge Karpenkov2018-07-131-1/+1
| | | | | | | | The test is flaky otherwise on some of our macOS machines in the test fleet. Differential Revision: https://reviews.llvm.org/D49277 llvm-svn: 336966
* Simplify instrprof-dlopen-dlclose-gcov.test to avoid failures on Aarch64.Marco Castelluccio2018-07-126-6/+6
| | | | | | The test for a function with an if block in a single line (https://bugs.llvm.org/show_bug.cgi?id=38065) will be moved to a separate test. llvm-svn: 336942
* [SanitizerCoverage] Add associated metadata to 8-bit counters.Matt Morehouse2018-07-121-1/+3
| | | | | | | | | | | | | | | | | | | | Summary: This allows counters associated with unused functions to be dead-stripped along with their functions. This approach is the same one we used for PC tables. Fixes an issue where LLD removes an unused PC table but leaves the 8-bit counter. Reviewers: eugenis Reviewed By: eugenis Subscribers: llvm-commits, hiraditya, kcc Differential Revision: https://reviews.llvm.org/D49264 llvm-svn: 336941
* [libFuzzer] If LLD available, require it to build first.Matt Morehouse2018-07-121-0/+3
| | | | | | | Since we now have a test that requires LLD, make sure it is built before that test runs. llvm-svn: 336932
* [libFuzzer] Use lld-available for gc-sections.test.Matt Morehouse2018-07-121-2/+2
| | | | | | | The lld feature is never available for libFuzzer tests, so gc-sections.test never actually runs. llvm-svn: 336926
* [XRay][compiler-rt] Fixup: require x86_64 for profiling mode testsDean Michael Berris2018-07-122-2/+4
| | | | | | | This constrains the build environments we are testing/supporting for the runtime tests until we can be sure xray works in more platforms. llvm-svn: 336878
* [FileCheck] Add -allow-deprecated-dag-overlap to another compiler-rt testJoel E. Denny2018-07-111-1/+1
| | | | | | See https://reviews.llvm.org/D47106 for details. llvm-svn: 336859
* [FileCheck] Add -allow-deprecated-dag-overlap to failing compiler-rt testsJoel E. Denny2018-07-111-2/+2
| | | | | | | | | | See https://reviews.llvm.org/D47106 for details. Reviewed By: probinson Differential Revision: https://reviews.llvm.org/D47326 llvm-svn: 336845
* Remove ppc64 BE XFAILs now that gcov profiling works, after starting a cleanZaara Syeda2018-07-113-8/+2
| | | | | | build this time. llvm-svn: 336839
* Link to the correct bug number about the Mac failure for ↵Marco Castelluccio2018-07-111-1/+1
| | | | | | instrprof-shared-gcov-flush.test. llvm-svn: 336820
* Revert 336811, there are still some problems with the tests.Zaara Syeda2018-07-113-2/+8
| | | | llvm-svn: 336819
* Remove ppc64 BE XFAILs now that gcov profiling works.Zaara Syeda2018-07-113-8/+2
| | | | llvm-svn: 336811
* [XRay] basic mode PID and TID always fetchDean Michael Berris2018-07-111-0/+100
| | | | | | | | | | | | | | Summary: XRayRecords now includes a PID field. Basic handlers fetch pid and tid each time they are called instead of caching the value. Added a testcase that calls fork and checks if the child TID is different from the parent TID to verify that the processes' TID are different in the trace. Reviewers: dberris, Maknee Reviewed By: dberris, Maknee Subscribers: kpw, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D49025 llvm-svn: 336769
* [libFuzzer] Disable dataflow.test on AArch64.Matt Morehouse2018-07-101-0/+1
| | | | | | | | | | | | | | | | | | | Summary: After my recent change to allow MSan + libFuzzer, the ExplodeDFSanLabelsTest.cpp test started to overflow the stack with recursive function SetBytesForLabel() on an AArch64 bot. Perhaps that bot has a smaller stack size, or maybe AArch64 has larger stack frames for this particular function. Reviewers: kcc, javed.absar Reviewed By: kcc Subscribers: kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D49150 llvm-svn: 336725
* Revert "[Fuzzer] Afl driver changing iterations handling"Matt Morehouse2018-07-101-9/+2
| | | | | | | | | | | This reverts rL334510 due to breakage of afl_driver's command line interface. Patch By: Jonathan Metzman Differential Revision: https://reviews.llvm.org/D49141 llvm-svn: 336719
* Limit ASan non-executable-pc test case to x86 botsVlad Tsyrklevich2018-07-101-10/+4
| | | | | | | | The test case fails on the big-endian PPC bot, probably because PowerPC uses function descriptors. More over other architectures don't support NX mappings. (This test case was not being exercised prior to r336633.) llvm-svn: 336714
* [asan] Disable non-execute test on s390Ulrich Weigand2018-07-101-0/+3
| | | | | | | | Processors before z14 don't support non-execute protection, so they will start execution random memory contents, causing the test to randomly fail or succeed. llvm-svn: 336705
* Remove s390x XFAILs now that gcov profiling works.Ulrich Weigand2018-07-103-6/+6
| | | | llvm-svn: 336695
* Reapply "Make __gcov_flush flush counters for all shared libraries"Marco Castelluccio2018-07-1019-16/+607
| | | | | | | This reapplies r336365, after marking tests as failing on various configurations. llvm-svn: 336678
* [scudo] Use mkdir -p when creating directories for a testFilipe Cabecinhas2018-07-101-1/+1
| | | | llvm-svn: 336673
* [LibFuzzer] Disable MSan test on Darwin which was added by r336619. The ↵Dan Liew2018-07-102-0/+9
| | | | | | | | | MemorySanitizer is not supported on Darwin currently and so Clang refuses to compile with `-fsanitize=memory`. llvm-svn: 336669
* [compiler-rt] Get rid of "%T" expansionsFilipe Cabecinhas2018-07-1025-105/+133
| | | | | | | | | | | | | | | | | | | Summary: Original patch by Kuba Mracek The %T lit expansion expands to a common directory shared between all the tests in the same directory, which is unexpected and unintuitive, and more importantly, it's been a source of subtle race conditions and flaky tests. In https://reviews.llvm.org/D35396, it was agreed that it would be best to simply ban %T and only keep %t, which is unique to each test. When a test needs a temporary directory, it can just create one using mkdir %t. This patch removes %T in compiler-rt. Differential Revision: https://reviews.llvm.org/D48618 llvm-svn: 336661
* Add lowercase OS name featureVlad Tsyrklevich2018-07-101-1/+3
| | | | | | | | | | | | | | | | Summary: Some tests already make use of OS feature names, e.g. 'linux' and 'freebsd', but they are not actually currently set by lit. Reviewers: pcc, eugenis Reviewed By: eugenis Subscribers: emaste, krytarowski, delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D49115 llvm-svn: 336633
* [libFuzzer] Make -fsanitize=memory,fuzzer work.Matt Morehouse2018-07-094-2/+73
| | | | | | | | | | | This patch allows libFuzzer to fuzz applications instrumented with MSan without recompiling libFuzzer with MSan instrumentation. Fixes https://github.com/google/sanitizers/issues/958. Differential Revision: https://reviews.llvm.org/D48891 llvm-svn: 336619
* Revert "[libFuzzer] Mutation tracking and logging implemented"Matt Morehouse2018-07-091-5/+0
| | | | | | This reverts r336597 due to bot breakage. llvm-svn: 336616
* [libFuzzer] Mutation tracking and logging implementedMatt Morehouse2018-07-091-0/+5
| | | | | | | | | | | | Code now exists to track number of mutations that are used in fuzzing in total and ones that produce new coverage. The stats are currently being dumped to the command line. Patch By: Kode Williams Differntial Revision: https://reviews.llvm.org/D48054 llvm-svn: 336597
* Revert "Make __gcov_flush flush counters for all shared libraries"Michael Zolotukhin2018-07-0719-598/+16
| | | | | | | This reverts r336365: the added tests are failing on various configurations (e.g. on green-dragon). llvm-svn: 336474
* Recommit "[CMake] Run libFuzzer tests with check-all."Yvan Roux2018-07-061-2/+0
| | | | | | Since problematic tests on AArch64 were disabled at r336446. llvm-svn: 336449
* [MSan] Add functions to enable/disable interceptor checks.Matt Morehouse2018-07-061-0/+52
| | | | | | | | | | | | | | | | | | Summary: The motivation for this change is to make libFuzzer+MSan possible without instrumenting libFuzzer. See https://github.com/google/sanitizers/issues/958. Reviewers: eugenis Reviewed By: eugenis Subscribers: llvm-commits, kcc Differential Revision: https://reviews.llvm.org/D48890 llvm-svn: 336447
* [libFuzzer] Disable hanging tests on AArch64Yvan Roux2018-07-063-0/+3
| | | | | | | | | Disable problematic tests which broke AArch64 bots. Details available in Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=38034 Differential Revision: https://reviews.llvm.org/D49011 llvm-svn: 336446
* Make __gcov_flush flush counters for all shared librariesMarco Castelluccio2018-07-0519-16/+598
| | | | | | | | | | | | | | | | | Summary: This will make the behavior of __gcov_flush match the GCC behavior. I would like to rename __gcov_flush to __llvm_gcov_flush (in case of programs linking to libraries built with different compilers), but I guess we can't for compatibility reasons. Reviewers: davidxl Reviewed By: davidxl Subscribers: samsonov, vitalybuka, pcc, kcc, junbuml, glider, fhahn, eugenis, dvyukov, davidxl, srhines, chh, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D48538 llvm-svn: 336365
* Revert "[CMake] Run libFuzzer tests with check-all."Yvan Roux2018-07-051-0/+2
| | | | | | | Revert due to AArch64 bots breakage, upstream PR raised to track the issue: https://bugs.llvm.org/show_bug.cgi?id=38034 llvm-svn: 336341
* [libFuzzer] add one more value profile metric, under a flag (experimental)Kostya Serebryany2018-07-032-1/+9
| | | | llvm-svn: 336234
* [libFuzzer] add a tiny and surprisingly hard puzzleKostya Serebryany2018-07-031-0/+14
| | | | llvm-svn: 336229
* [UBsan] Enable subset of unit tests for OpenBSDDavid Carlier2018-06-3010-3/+17
| | | | | | | | | | Reviewers: kubamracek, krytarowski Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D48805 llvm-svn: 336053
* [profile] Add llvm_gcov_flush to be called outside a shared libraryChih-Hung Hsieh2018-06-291-0/+30
| | | | | | | | | | __gcov_flush is hidden. For applications to dump profiling data of selected .so files, they can use dlsym to find and call llvm_gcov_flush in each .so file. Differential Revision: https://reviews.llvm.org/D45454 llvm-svn: 336019
* [cfi] Use __builtin version of __clear_cache.Evgeniy Stepanov2018-06-291-1/+1
| | | | | | __builtin___clear_cache is also present on X86 and does the right thing (i.e. nop) there. llvm-svn: 335997
* [scs] Disable negative test in shadowcallstack.Evgeniy Stepanov2018-06-291-9/+1
| | | | | | | | The test checks that scs does NOT work correctly w/o runtime support. That's a strange thing to test, and it is also flaky, because things may just work if x18 happens to point to a writable page. llvm-svn: 335982
* [scudo] Add some runtime tests for the minimal runtimeKostya Kortchinsky2018-06-294-4/+43
| | | | | | | | | | | | | | | | Summary: As well as some tests to ensure that various combinations of the clang command line flags work (shared/static/minimal). Reviewers: eugenis, alekseyshl, vitalybuka Reviewed By: vitalybuka Subscribers: srhines, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D48553 llvm-svn: 335981
* [cfi] Reset i-cache after copying code in test.Evgeniy Stepanov2018-06-291-2/+4
| | | | | | | Fixes intermittent crashes on Android. Also add PROT_READ to the code mapping for no real reason. llvm-svn: 335943
OpenPOWER on IntegriCloud