summaryrefslogtreecommitdiff
path: root/test/sanitizer_common/TestCases/Linux
AgeCommit message (Collapse)Author
2017-12-23[Sanitizers] Export aligned new/delete from runtimes.Alex Shlyapnikov
Summary: Export aligned new/delete to make dynamic runtimes work again. Remove all valid new/delete cases from ASan test, there's a test in common for that. Reviewers: eugenis Subscribers: srhines, kubamracek, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D41548 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@321394 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-22[Sanitizers] Disable new_delete_test.cc on Android until it's supported.Alex Shlyapnikov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@321374 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-22[MSan,TSan] Add aligned new/delete interceptors.Alex Shlyapnikov
Summary: Providing aligned new/delete implementations to match ASan. Unlike ASan, MSan and TSan do not perform any additional checks on overaligned memory, hence no sanitizer specific tests. Reviewers: eugenis Subscribers: kubamracek, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D41532 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@321365 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-20[tsan] Fix sigaction implementation when it's called only to get handlerVitaly Buka
Reviewers: eugenis Subscribers: kubamracek, llvm-commits, krytarowski Differential Revision: https://reviews.llvm.org/D40272 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@318707 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-13[sanitizer] Relax stack check in assert.cc even moreVitaly Buka
assert implementations can be very different git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@318089 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-13[tsan] Fix signal chainingVitaly Buka
Summary: Return saved values only if installed sigaction is our wrapper. Reviewers: eugenis, dvyukov Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D39935 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@318082 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-13[tsan] Deadly signal handler for tsanVitaly Buka
Summary: https://github.com/google/sanitizers/issues/637 Reviewers: eugenis Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D39929 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@318078 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-13[sanitizer] Relax stack checkVitaly Buka
-NEXT sometimes does not work as LLVMSymbolizer warning can appear there. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@318077 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-12[sanitizer] Simplify stack check in accert.ccVitaly Buka
Somehow on arm bots stack does not include main. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@318002 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-12[sanitizer] Try to see test output on armv7Vitaly Buka
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@318001 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-11[msan] Fix signal chainingVitaly Buka
Return internally stored handlers only if handlers is set to wrapper git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317970 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-11[sanitizer] Include stack trace check into signal testsVitaly Buka
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317963 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-11[ubsan] Fix ubsan tests broken by linking as C instead of C++Vitaly Buka
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317958 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-10[msan] Deadly signal handler for msanVitaly Buka
Summary: Part of https://github.com/google/sanitizers/issues/637 Reviewers: eugenis, alekseyshl Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D39826 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@317864 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-17Revert "[asan] Deflake one test by running it 3 times."Evgeniy Stepanov
Disable this test on Android/x86 only. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@316023 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-13[asan] Deflake one test by running it 3 times.Evgeniy Stepanov
The test seems to trigger an android platform bug under load. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315777 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-12[sanitizer] Workaround a Linux kernel bug in hard_rss_limit_mb_test.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315632 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-12[asan] Disable a flaky test on android.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315602 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-11[asan] Tweak test output to diagnose buildbot failures.Evgeniy Stepanov
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315479 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-11[sanitizer] Re-disable several tests on Android.Evgeniy Stepanov
The tests have been enabled by accident in r315389. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@315396 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-25[mips][compiler-rt] Disable sem_init_glibc.cc for MIPS64.Simon Dardis
This test can't pass on MIPS64 due to the lack of versioned interceptors for asan and company. The interceptors bind to the earlier version of sem_init rather than the latest version. For MIPS64el this causes an accidental pass while MIPS64 big endian fails due reading back a different 32bit word to what sem_init wrote when the test is corrected to use 64bit atomics. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@314100 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-23[ubsan] Fix assert.cc test by compiling it as C++Vitaly Buka
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@314057 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-23[ubsan] Support signal specific options in ubsanVitaly Buka
Summary: Part of https://github.com/google/sanitizers/issues/637 Standalone ubsan needs signal and sigaction handlers and interceptors. Plugin mode should rely on parent tool. Reviewers: eugenis, alekseyshl Subscribers: kubamracek, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D37895 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@314052 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-22[lsan] Deadly signal handler for lsanVitaly Buka
Summary: Part of https://github.com/google/sanitizers/issues/637 Reviewers: eugenis, alekseyshl Subscribers: llvm-commits, dberris, kubamracek, krytarowski Differential Revision: https://reviews.llvm.org/D37608 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@314041 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-19[mips][compiler-rt] UnXFAIL test.Simon Dardis
lsan and asan were reporting leaks caused by a glibc configuration issue. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313645 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-16[sanitizer] Fix check for i386 Android in lit testsVitaly Buka
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313452 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-16[sanitizer] Disable sanitizer test which already fails on Android i386Vitaly Buka
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313447 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-16[sanitizer] Support check-asan on AndroidVitaly Buka
This patch enabled asan tests from sanitizer_common. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313444 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-15[sanitizer] Simplify checks in allow_user_segv.ccVitaly Buka
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313342 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-15[lsan] Disable clang-format on few RUN: statementsVitaly Buka
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313321 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-14Revert "[mips] Fix sem_init_glibc test for MIPS."Simon Dardis
The commit did not fix the failing test and instead exposed an inconsistency between lsan and (t|m|a)san. I'm reverting the patch as it causes more failures and the original patch had a '||' instead of '&&', which meant that an N32 build of test would have be incorrect w.r.t. __HAVE_64B_ATOMICS for glibc. This reverts commit r313248. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313291 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-14[mips] Fix sem_init_glibc test for MIPS.Simon Dardis
glibc changed the implementation of semaphores for glibc 2.21 requiring some target specific changes for this compiler-rt test. Modify the test to cope with MIPS64 and do some future/correctness work by tying the define for MIPS64 to exactly the define of __HAVE_64B_ATOMICS in glibc. Contributions from Nitesh Jain. Reviewers: eugenis Differential Revision: https://reviews.llvm.org/D37829 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313248 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-14[sanitizer] Mark allow_user_segv as XFAIL instead of UNSUPPORTEDVitaly Buka
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313241 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-09[ubsan] Enable UBsan in sanitizer_common testsVitaly Buka
Summary: Failing tests just marked as UNSUPPORTED or XFAIL. Some of them can be easily supported, but I'll do this in separate patches. Reviewers: eugenis, alekseyshl Subscribers: srhines, kubamracek, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D37630 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@312860 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-09[compiler-rt] Move allow_user_segv.cc into sanitizer_commonVitaly Buka
Summary: Part of https://github.com/google/sanitizers/issues/637 Reviewers: eugenis Subscribers: kubamracek, dberris, llvm-commits Differential Revision: https://reviews.llvm.org/D37537 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@312859 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-25Revert "[compiler-rt] Include thread ID into sanitizers logs"Vitaly Buka
This improvement introduce additional dependencies on sandboxed environments. This reverts commit r308637. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308984 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-20[compiler-rt] Include thread ID into sanitizers logsVitaly Buka
Reviewers: kcc, alekseyshl Subscribers: kubamracek, llvm-commits, dberris Differential Revision: https://reviews.llvm.org/D35654 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@308637 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-05Revert r304285, r304297.Evgeniy Stepanov
r304285 - [sanitizer] Avoid possible deadlock in child process after fork r304297 - [sanitizer] Trying to fix MAC buildbots after r304285 These changes create deadlock when Tcl calls pthread_create from a pthread_atfork child handler. More info in the original review at https://reviews.llvm.org/D33325 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@304735 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-31[sanitizer] Avoid possible deadlock in child process after forkMaxim Ostapenko
This patch addresses https://github.com/google/sanitizers/issues/774. When we fork a multi-threaded process it's possible to deadlock if some thread acquired StackDepot or allocator internal lock just before fork. In this case the lock will never be released in child process causing deadlock on following memory alloc/dealloc routine. While calling alloc/dealloc routines after multi-threaded fork is not allowed, most of modern allocators (Glibc, tcmalloc, jemalloc) are actually fork safe. Let's do the same for sanitizers except TSan that has complex locking rules. Differential Revision: https://reviews.llvm.org/D33325 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@304285 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-25[compiler-rt] Replace allow_user_segv_handler=0 with kHandleSignalExclusiveVitaly Buka
Summary: allow_user_segv_handler had confusing name did not allow to control behavior for signals separately. Reviewers: eugenis, alekseyshl, kcc Subscribers: llvm-commits, dberris, kubamracek Differential Revision: https://reviews.llvm.org/D33371 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@303941 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-25[PowerPC] Fix test case sem_init_glibc.cc for powerpc64beBill Seurer
This test case fails on powerpc64be with older glibcs because of the glibc version test. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@303863 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-10[mips] XFAIL getpwnam_r_invalid_user.cc testSimon Dardis
XFAIL this test while we investigate the root cause. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@302635 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-03[asan] print the 'unexpected format specifier in printf interceptor' warning ↵Kostya Serebryany
just once (came up in https://github.com/google/oss-fuzz/pull/562). Not touching a similar scanf warning -- for some reason it does not fire for me. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@302064 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-03[sanitizer] Intercept mcheck and mprobe on LinuxMaxim Ostapenko
This patch addresses https://github.com/google/sanitizers/issues/804. Users can use mcheck and mprobe functions to verify heap state so we should intercept them to avoid breakage of valid code. Differential Revision: https://reviews.llvm.org/D32589 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@302001 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-12[msan] fix iconv interceptor. before the fix the interceptor failed to mark ↵Kostya Serebryany
memory as initialized if iconv returned -1. Found in a hard way while fuzzing libxml2 :( git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@300010 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-23Bypass potential libc's sysconf interceptorsAlex Shlyapnikov
Summary: sysconf(_SC_PAGESIZE) is called very early during sanitizer init and any instrumented code (sysconf() wrapper/interceptor will likely be instrumented) calling back to sanitizer before init is done will most surely crash. 2nd attempt, now with glibc version checks (D31092 was reverted). Reviewers: eugenis Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D31221 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@298613 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-21Revert "Bypass potential libc's sysconf wrappers for sysconf(_SC_PAGESIZE) call"Vitaly Buka
Bot can't find <sys/auxv.h> This reverts commit r298305. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@298343 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-20Bypass potential libc's sysconf wrappers for sysconf(_SC_PAGESIZE) callAlex Shlyapnikov
Summary: sysconf(_SC_PAGESIZE) is called very early, during sanitizer init and any instrumented code (a wrapper/interceptor will likely be instrumented) calling back to sanitizer before init is done will most surely crash. Reviewers: eugenis Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D31092 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@298305 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-09[sanitizer] Bail out with warning if user dlopens shared library with ↵Maxim Ostapenko
RTLD_DEEPBIND flag People keep hitting on spurious failures in malloc/free routines when using sanitizers with shared libraries dlopened with RTLD_DEEPBIND (see https://github.com/google/sanitizers/issues/611 for details). Let's check for this flag and bail out with warning message instead of failing in random places. Differential Revision: https://reviews.llvm.org/D30504 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@297370 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-03[lsan] Disable sem_init_glibc.cc testcase for LSan x86.Maxim Ostapenko
This test relies on sanitizer common interceptor to pick the oldest version of sem_init function from Glibc. But LSan actually doesn't intercept sem_init, thus the new implementation is called that causes test failure. Disable it for LSan x86, the proper fix would require to check Glibc version at runtime and adjust GET_SEM_VALUE(V) accordingly. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@294001 91177308-0d34-0410-b5e6-96231b3b80d8