summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2017-05-02Revert r301904 causing tsan test failure in x86_64-linux-autoconfPierre Gousseau
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301909 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-02[asan] Add strndup/__strndup interceptors if targeting linux.Pierre Gousseau
Differential Revision: https://reviews.llvm.org/D31457 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301904 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-02[sanitizer-coverage] add a deprecation note for the old sanitizer-coverage; ↵Kostya Serebryany
remove a TODO printf git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301889 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-01[sanitizer-coverage] remove more stale codeKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301845 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-01[ubsan] Fall back to the fast unwinder when print_stacktrace=1Vedant Kumar
This makes it possible to get stacktrace info when print_stacktrace=1 on Darwin (where the slow unwinder is not currently supported [1]). This should not regress any other platforms. [1] The thread about r300295 has a relatively recent discusion about this. We should be able to enable the existing slow unwind functionality for Darwin, but this needs more testing. Differential Revision: https://reviews.llvm.org/D32517 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301839 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-01[asan] speed up small memcpy (> 32 but <= 64 bytes)Kostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301837 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-01[sanitizer-coverage] disable coverage_direct=1, will remove the code in a ↵Kostya Serebryany
few weeks git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301826 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-01[powerpc] deactivate flakey tests on powerpc64leBill Seurer
These test cases occassionally fail when run on powerpc64le: ignore_lib1.cc ignore_lib5.cc TestCases/Posix/current_allocated_bytes.cc rtl/TsanRtlTest/Posix.ThreadLocalAccesses TestCases/Posix/coverage-fork-direct.cc The failures cause false problem reports to be sent to developers whose code had nothing to do with the failures. Reactivate them when the real problems are fixed. This could also be related to the same problems as with the tests ThreadedOneSizeMallocStressTest, ThreadedMallocStressTest, ManyThreadsTest, and several others that do not run reliably on powerpc. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301798 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-28Fix unset-insert-libraries-on-exec.cc to use "%env" to make it work in iOS ↵Kuba Mracek
simulator. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301622 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-28Fix the reexec-insert-libraries-env.cc testcase to use %env to make it work ↵Kuba Mracek
on iOS simulator. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301621 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-28[asan] Add a compilation wrapper that codesigns shared libraries to support ↵Kuba Mracek
iOS simulator testing Tests that run on the iOS simulator require the dlopen'd dylibs are codesigned. This patch adds the "iossim_compile.py" wrapper that codesigns any produces dylib. Differential Revision: https://reviews.llvm.org/D32561 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301617 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-27[ubsan] Make the cast overflow message less redundantVedant Kumar
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301589 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-27[asan] Fix dead stripping of globals on Linux (compiler-rt).Evgeniy Stepanov
Third attempt. See the description of the corresponding commit in LLVM for more details. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301588 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-27TSan: update line number after XFAIL on iOS.Tim Northover
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301560 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-27Also match the output on 32 bit systems.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301543 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-27Add missing FileCheck, update CHECK lines and avoid subshell.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301541 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-26Mark two tests (dead-strip.c, initialization-bug.cc) as unsupported on iOS.Kuba Mracek
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301478 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-26[asan] Allow propagating env variables when testing on iOS SimulatorKuba Mracek
This patch adds "%env" as a way to express that the environment variable should be set on the target device/simulator. This fixes some test failures when testing on iOS/Simulator. Differential Revision: https://reviews.llvm.org/D32556 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301462 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-26XFAIL the TSan XPC tests on iOS. XPC isn't available on iOS.Kuba Mracek
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301459 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-26Fix the dump_registers.cc ASan testcase on iOS to allow both SIGSEGV and SIGBUS.Kuba Mracek
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301458 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-26Mark the asan-sigbus.cpp ASan testcase as unsupported on iOS. We don't ↵Kuba Mracek
handle propagating crashes from/to iOS well. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301456 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-26Add a missing "%run" expansion to fread_fwrite.cc test case to support ↵Kuba Mracek
testing on iOS simulator. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301455 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-26Fix the typo in strtok.c testcase: There was a missing space in %run expansion.Kuba Mracek
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301451 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-26Follow-up for r301443: The python scrips need to be executable.Kuba Mracek
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301448 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-26[asan] Add support for running lit tests in the iOS SimulatorKuba Mracek
This patch adds a basic support for running the ASan lit test suite against an iOS Simulator. This is done by generating more lit.site.cfg configurations into subdirectories such as IOSSimI386Config and IOSSimX86_64Config. These test suites are not added into "check-all" or into "check-asan", they have to be run manually. Differential Revision: https://reviews.llvm.org/D31477 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301443 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-26[test] Build sanitizer/xray tests only if COMPILER_RT_BUILD_* is onMichal Gorny
Cover the sanitizer tests with COMPILER_RT_BUILD_SANITIZERS conditional, and add COMPILER_RT_BUILD_XRAY conditional to the xray tests. This makes it possible to do a pure-builtins build with tests enabled. Differential Revision: https://reviews.llvm.org/D32489 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301387 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-24[asan] Fix Windows global dead stripping testsReid Kleckner
Pass /Gw to clang-cl which is equivalent to -fdata-sections. This is now necessary. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301272 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-24Mark a test as requiring a shell.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301265 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-24[cfi] Fix wrong CMake condition for WIN32.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301257 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-24[asan] Remove asanwrapper from Android test harness.Evgeniy Stepanov
It is only necessary for pre-L and creates problems on newer builds. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301256 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-24[cfi] Disable ThinLTO + CFI tests on Windows.Evgeniy Stepanov
PR32770. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301235 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-24[tsan] Include __tsan_external_* API from a header file instead of declaring ↵Kuba Mracek
them manually. NFC. Differential Revision: https://reviews.llvm.org/D32384 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301190 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-24[tsan] Remove the extra word "object" from description of external racesKuba Mracek
Differential Revision: https://reviews.llvm.org/D32383 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301189 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-24Revert [scudo] Enabling MIPS support for ScudoSagar Thakur
This patch broke the buildbot clang-cmake-mips. Investigating the issue. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301173 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-24[scudo] Enabling MIPS support for ScudoSagar Thakur
Adding MIPS 32-bit and 64-bit support for Scudo. Reviewed by cryptoad Differential: D31803 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301158 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-22[cfi] Disable thinlto tests on Darwin.Ahmed Bougacha
These were added in r301016, but they're failing, because -fsanitize=cfi seemingly causes -flto=thin to emit raw bitcode objects, rather than the mach-o-wrapped bitcode we emit with -flto=thin alone. That causes all tests to fail with ld64 errors. Filed PR32741. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301065 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-21[lsan] Enable LSan on PowerPC64.Alex Shlyapnikov
Summary: Re-landing reverted D31995 with suppressions defined in D32303 and D32377. Reviewers: eugenis Subscribers: nemanjai, llvm-commits Differential Revision: https://reviews.llvm.org/D32379 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301048 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-21[asan] Optimize strchr for strict_string_checks=falseVitaly Buka
Summary: strchr interceptor does not need to call strlen if strict_string_checks is not enabled. Unnecessary strlen calls affect python parser performance. Reviewers: eugenis, kcc Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D32264 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301027 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-21[cfi] Replace elif with elseif in cmake.Evgeniy Stepanov
Apparently, elif() is deprecated. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301022 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-21[cfi] Run tests with and without lld and thinlto.Evgeniy Stepanov
Run tests in all configurations: (standalone, with devirtualization) * (gold, lld) * (lto, thinlto) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301016 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-21[tsan] Add a test for "external" API that checks the dup suppression is ↵Kuba Mracek
based on the caller PC We need to make sure that the "external" API isn't dup'ing all data races into a single one (because the stack might look the same) and suppressing all external races. This works now, so just adding a test for that. Differential Revision: https://reviews.llvm.org/D31734 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301011 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-21[tsan] Ignore memory accesses for libignored modules for "external" racesKuba Mracek
On Darwin, the setting ignore_noninstrumented_modules is used to suppress false positives in code that users don't have control of. The recently added "external" API (which can be used to detect races on objects provided by system libraries, but the race is actually user's fault) ignores this flag and it can report issues in non-instrumented modules. This patch fixes that. Differential Revision: https://reviews.llvm.org/D31553 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@301000 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-21[tsan] Don't report bugs from interceptors called from libignored modulesKuba Mracek
This patch make sure we don't report deadlocks and other bug types when we're inside an interceptor that was called from a noninstrumented module (when ignore_noninstrumented_modules=1 is set). Adding a testcase that shows that deadlock detection still works on Darwin (to make sure we're not silencing too many reports). Differential Revision: https://reviews.llvm.org/D31449 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@300998 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-21Revert r300889, r300906, r300935, r300939Diana Picus
At least one of the ARM bots is still broken: Command Output (stderr): -- /home/buildslave/buildslave/clang-cmake-armv7-a15-full/llvm/projects/compiler-rt/test/asan/TestCases/Posix/strchr.c:31:12: error: expected string not found in input // CHECK: strchr.c:[[@LINE-2]] ^ <stdin>:3:59: note: scanning from here ==16297==ERROR: AddressSanitizer: SEGV on unknown address 0xb5add000 (pc 0xb6dccaa4 bp 0xbe8c19c8 sp 0xbe8c1570 T0) ^ <stdin>:3:59: note: with expression "@LINE-2" equal to "29" ==16297==ERROR: AddressSanitizer: SEGV on unknown address 0xb5add000 (pc 0xb6dccaa4 bp 0xbe8c19c8 sp 0xbe8c1570 T0) ^ <stdin>:5:57: note: possible intended match here #0 0xb6dccaa3 in strlen /build/glibc-f8FFOS/glibc-2.23/string/../sysdeps/arm/armv6t2/strlen.S:82 Try to fix by reverting r300889 and subsequent fixes: Revert "[asan] Fix test by removing "The signal is caused" check." Revert "[asan] Fix test on ppc64le-linux by checking "UNKNOWN memory access"" Revert "[asan] Match BUS and SIGV to fix test on Darwin" Revert "[asan] Optimize strchr for strict_string_checks=false" git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@300955 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-21[asan] Fix test by removing "The signal is caused" check.Vitaly Buka
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@300939 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-21[asan] Fix test on ppc64le-linux by checking "UNKNOWN memory access"Vitaly Buka
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@300935 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-21Disable LSan on ppc64, some tests are failing.Alex Shlyapnikov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@300933 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-21Revert "Enable lsan test suite on Darwin x86_64 builds"Ahmed Bougacha
This reverts commit r300897. Most LSan/ASan tests are failing on darwin bots. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@300929 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-20[asan] move textdomain.c to Linux dir, as the test is Linux-specificKostya Serebryany
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@300926 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-20sanitizer: fix crash with textdomain(NULL) interceptorKostya Serebryany
Summary: The textdomain function accepts a NULL parameter (and should then return the current message domain). Add a check for this and include ASAN tests. Link: https://github.com/google/sanitizers/issues/787 Reviewers: m.guseva, kcc Reviewed By: kcc Subscribers: kubamracek Differential Revision: https://reviews.llvm.org/D32318 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@300924 91177308-0d34-0410-b5e6-96231b3b80d8