summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test/sanitizer_common/TestCases/Linux
Commit message (Collapse)AuthorAgeFilesLines
* [Sanitizers] Porting getrandom/getentropy interceptors to FreeBSDDavid Carlier2019-10-101-22/+0
| | | | | | | | | | | | | - Available from 12.x branch, by the time it lands next year in FreeBSD tree, the 11.x's might be EOL. - Intentionally changed the getrandom test to C code as with 12.0 (might be fixed in CURRENT since), there is a linkage issue in C++ context. Reviewers: emaste, dim, vitalybuka Reviewed-By: vitalybuka Differential Revision: https://reviews.llvm.org/D68451 llvm-svn: 374315
* [sanitizer, NFC] Fix grammar in commentVitaly Buka2019-10-091-1/+1
| | | | llvm-svn: 374223
* [sanitizer] Disable signal_trap_handler on s390Vitaly Buka2019-10-091-0/+5
| | | | llvm-svn: 374220
* [sanitizer] Make signal_name a C testVitaly Buka2019-10-091-2/+3
| | | | llvm-svn: 374213
* [sanitizer] Use raise() in test and cover more signalsVitaly Buka2019-10-092-8/+19
| | | | llvm-svn: 374211
* [sanitizer] Disable crypt*.cpp tests on AndroidVitaly Buka2019-10-081-5/+4
| | | | llvm-svn: 374088
* [sanitizer] Fix signal_trap_handler.cpp on androidVitaly Buka2019-10-081-6/+11
| | | | llvm-svn: 374010
* [msan] Add interceptors: crypt, crypt_r.Evgeniy Stepanov2019-10-081-0/+37
| | | | | | | | | | | | Reviewers: vitalybuka Subscribers: srhines, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D68431 llvm-svn: 373993
* [sanitizer] Print SIGTRAP for corresponding signalVitaly Buka2019-10-071-0/+8
| | | | | | | | | | | | Reviewers: eugenis, jfb Subscribers: #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D68603 llvm-svn: 373979
* [tsan] Don't delay SIGTRAP handlerVitaly Buka2019-10-071-0/+29
| | | | | | | | | | | | Reviewers: eugenis, jfb Subscribers: #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D68604 llvm-svn: 373978
* [compiler-rt] Remove O1 tests from signal_line.cppVitaly Buka2019-10-041-4/+0
| | | | | | It does not work on arm llvm-svn: 373702
* [compiler-rt] Fix signal_line.cpp testVitaly Buka2019-10-041-2/+2
| | | | | | r373682 committed wrong experimental version llvm-svn: 373684
* [compiler-rt] Remove O2, O3 from signal_line test for fix android testsVitaly Buka2019-10-041-11/+2
| | | | llvm-svn: 373682
* [compiler-rt] More optimization levels in signal_line.cpp testVitaly Buka2019-10-031-12/+13
| | | | llvm-svn: 373642
* [compiler-rt] Use GetNextInstructionPc in signal handlersVitaly Buka2019-10-021-0/+36
| | | | | | | | | | | | | | | | | | Summary: All other stack trace callers assume that PC contains return address. HWAsan already use GetNextInstructionPc in similar code. PR43339 Reviewers: eugenis, kcc, jfb Subscribers: dexonsmith, dberris, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D68313 llvm-svn: 373529
* [compiler-rt] Implement getrandom interceptionVitaly Buka2019-08-061-0/+22
| | | | | | | | | | | | | | | | | | | | | | | Summary: Straightforward implementation of `getrandom` syscall and libc hooks. Test Plan: Local MSAN failures caused by uninstrumented `getrandom` calls stop failing. Patch by Andrew Krieger. Reviewers: eugenis, vitalybuka Reviewed By: vitalybuka Subscribers: srhines, kubamracek, dberris, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D65551 llvm-svn: 367999
* Follow-up for r367863 and r367656Nico Weber2019-08-051-1/+1
| | | | llvm-svn: 367888
* compiler-rt: Rename cc files below test/sanitizer_common to cppNico Weber2019-08-0525-3/+3
| | | | | | See r367803 and similar other changes. llvm-svn: 367863
* [compiler-rt] Rename lit.*.cfg.* -> lit.*.cfg.py.*Reid Kleckner2019-06-271-0/+0
| | | | | | | | | | | | | These lit configuration files are really Python source code. Using the .py file extension helps editors and tools use the correct language mode. LLVM and Clang already use this convention for lit configuration, this change simply applies it to all of compiler-rt. Reviewers: vitalybuka, dberris Differential Revision: https://reviews.llvm.org/D63658 llvm-svn: 364591
* [compiler-rt] Fix name_to_handle_at.cc test on Overlay2 (for Docker)Amy Kwan2019-06-121-1/+1
| | | | | | | | | | | | | This patch aims to fix the test case, name_to_handle_at.cc that fails on Docker. Overlay2 on Docker does not support the current check for the name_to_handle_at() function call of the test case. The proposed fix is to check for /dev/null in the test instead, as this check is supported. Checking for /dev/null has been utilized in the past for other test cases, as well. Differential Revision: https://reviews.llvm.org/D63094 llvm-svn: 363167
* Add support for background thread on NetBSD in ASanKamil Rytarowski2018-12-291-44/+0
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Change the point of calling MaybeStartBackgroudThread() from AsanInitInternal() that is too early on NetBSD to a constructor (with aid of C++11 lambda construct). Enable the code for background thread as is for NetBSD. Rename test/sanitizer_common/TestCases/Linux/hard_rss_limit_mb_test.cc to test/sanitizer_common/TestCases/hard_rss_limit_mb_test.cc and allow runs on NetBSD. This tests passes correctly. Reviewers: vitalybuka, joerg, eugenis Reviewed By: eugenis Subscribers: eugenis, kubamracek, fedor.sergeev, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D55887 llvm-svn: 350139
* [compiler-rt] Use "ColumnLimit: 0" instead of "clang-format off" in testsVitaly Buka2018-12-014-8/+0
| | | | | | | | | | Reviewers: eugenis, jfb Subscribers: kubamracek, dberris, llvm-commits Differential Revision: https://reviews.llvm.org/D55152 llvm-svn: 348061
* [sanitizer] Fix mallopt test on Android.Evgeniy Stepanov2018-10-261-1/+2
| | | | | | | There is not a single common mallopt option between gnu/linux and android, so simply use a random number there. llvm-svn: 345394
* [sanitizer] Fix mallopt interceptor.Evgeniy Stepanov2018-10-251-0/+9
| | | | | | On error, mallopt is supposed to return 0, not -1. llvm-svn: 345323
* [asan] Change 3 tests from XFAIL to UNSUPPORTED.Evgeniy Stepanov2018-06-282-2/+2
| | | | | | The failure in https://github.com/google/sanitizers/issues/981 is flaky. llvm-svn: 335941
* [asan] Disable 3 tests on Android O+.Evgeniy Stepanov2018-06-282-0/+7
| | | | | | https://github.com/google/sanitizers/issues/981 llvm-svn: 335937
* [asan] Fix one more test on Android.Evgeniy Stepanov2018-06-281-3/+5
| | | | | | | | | | This change makes it pass both on libstdc++ and libc++-based toolchains. The error was: error: function-like macro '__GLIBC_PREREQ' is not defined ^ llvm-svn: 335936
* [TSan] Report proper error on allocator failures instead of CHECK(0)-ingAlex Shlyapnikov2018-06-182-15/+27
| | | | | | | | | | | | | | | | | | | | | | Summary: Following up on and complementing D44404 and other sanitizer allocators. Currently many allocator specific errors (OOM, for example) are reported as a text message and CHECK(0) termination, no stack, no details, not too helpful nor informative. To improve the situation, detailed and structured common errors were defined and reported under the appropriate conditions. Common tests were generalized a bit to cover a slightly different TSan stack reporting format, extended to verify errno value and returned pointer value check is now explicit to facilitate debugging. Reviewers: dvyukov Subscribers: srhines, kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D48087 llvm-svn: 334975
* [Sanitizers] Move pvalloc overflow tests to common.Alex Shlyapnikov2018-06-111-0/+46
| | | | | | | | | | | | | | | | | | | Summary: Now all sanitizers with improved allocator error reporting are covered by these common tests. Also, add pvalloc-specific checks to LSan. HWASan is not covered by sanitizer_common, hence its own pvalloc and other allocator tests. Reviewers: vitalybuka Subscribers: srhines, kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D47970 llvm-svn: 334424
* [MSan] Switch to common aligned allocs tests.Alex Shlyapnikov2018-06-091-3/+3
| | | | | | | | | | | | | | Summary: Switch to aligned_alloc and posix_memalign tests in sanitizer_common and delete the MSan-specific ones. Reviewers: vitalybuka Subscribers: srhines, kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D47968 llvm-svn: 334340
* [Sanitizers] Use proper substitution in common allocator test.Alex Shlyapnikov2018-06-081-4/+4
| | | | | | Use %env_tool_ops instead of %tool_options. llvm-svn: 334332
* [Sanitizers] Check alignment != 0 for aligned_alloc and posix_memalignAlex Shlyapnikov2018-06-081-0/+32
| | | | | | | | | | | | | | | Summary: Move the corresponding tests to the common folder (as all of the sanitizer allocators will support this feature soon) and add the checks specific to aligned_alloc to ASan and LSan allocators. Reviewers: vitalybuka Subscribers: srhines, kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D47924 llvm-svn: 334316
* [sanitizer] Intercept __pthread_mutex_lock and __pthread_mutex_unlockVitaly Buka2018-05-151-0/+34
| | | | | | | | | | Reviewers: eugenis, dvyukov Subscribers: srhines, kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D46793 llvm-svn: 332320
* Revert "[sanitizer] Intercept __pthread_mutex_lock and __pthread_mutex_unlock"Vitaly Buka2018-05-141-34/+0
| | | | | | | | Tsan tests fail. This reverts commit r332268 llvm-svn: 332276
* [sanitizer] Intercept __pthread_mutex_lock and __pthread_mutex_unlockVitaly Buka2018-05-141-0/+34
| | | | | | | | | | Reviewers: eugenis, dvyukov Subscribers: srhines, kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D46793 llvm-svn: 332268
* [ASan] Report proper ASan error on allocator failures instead of CHECK(0)-ingAlex Shlyapnikov2018-03-281-1/+1
| | | | | | | | | | | | | | | | | | Summary: Currently many allocator specific errors (OOM, for example) are reported as a text message and CHECK(0) termination, not stack, no details, not too helpful nor informative. To improve the situation, ASan detailed errors were defined and reported under the appropriate conditions. Issue: https://github.com/google/sanitizers/issues/887 Reviewers: eugenis Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D44404 llvm-svn: 328722
* Mmap interceptor providing mprotect supportVitaly Buka2018-03-241-2/+24
| | | | | | | | | | | | | | | | Summary: - Intercepting mprotect calls. - Fixing forgotten flag check. Patch by David CARLIER Reviewers: vitalybuka, vsk Subscribers: delcypher, srhines, kubamracek, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D44777 llvm-svn: 328415
* Revert "Mmap interceptor providing mprotect support"Vitaly Buka2018-03-231-24/+2
| | | | | | | | Breaks Darwin. This reverts commit r328369. llvm-svn: 328375
* Mmap interceptor providing mprotect supportVitaly Buka2018-03-231-2/+24
| | | | | | | | | | | | | | | | | | Summary: - Intercepting mprotect calls. - Fixing forgotten flag check. Patch by David CARLIER Reviewers: vitalybuka, vsk Reviewed By: vitalybuka Subscribers: srhines, kubamracek, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D44777 llvm-svn: 328369
* Mmap interceptor new option, Write Exec runtime detectorVitaly Buka2018-03-211-0/+15
| | | | | | | | | | | | | | | | | | Summary: Following-up the refactoring of mmap interceptors, adding a new common option to detect PROT_WRITE|PROT_EXEC pages request. Patch by David CARLIER Reviewers: vitalybuka, vsk Reviewed By: vitalybuka Subscribers: krytarowski, #sanitizers Differential Revision: https://reviews.llvm.org/D44194 llvm-svn: 328151
* Revert "Mmap interceptor new option, Write Exec runtime detector"Vitaly Buka2018-03-171-12/+0
| | | | | | | | Breaks Android bot. This reverts commit r327747. llvm-svn: 327762
* Mmap interceptor new option, Write Exec runtime detectorVitaly Buka2018-03-161-0/+12
| | | | | | | | | | | | | | | | Summary: Following-up the refactoring of mmap interceptors, adding a new common option to detect PROT_WRITE|PROT_EXEC pages request. Patch by David CARLIER Reviewers: vitalybuka, vsk Reviewed By: vitalybuka Subscribers: krytarowski, #sanitizers Differential Revision: https://reviews.llvm.org/D44194 llvm-svn: 327747
* [sanitizer] Move mmap interceptors into sanitizer_commonVitaly Buka2018-03-071-0/+13
| | | | | | | | | | Reviewers: devnexen, krytarowski, eugenis Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D44125 llvm-svn: 326851
* [sanitizer] Move readlinkat.c test from Linux to PosixVitaly Buka2018-01-311-25/+0
| | | | llvm-svn: 323837
* [sanitizer] Fix tests on Android and DarwinVitaly Buka2018-01-302-3/+4
| | | | llvm-svn: 323834
* [sanitizer] Add interceptors for readlinkat, name_to_handle_at, ↵Vitaly Buka2018-01-302-0/+45
| | | | | | | | | | | | | | | | | | | | | open_by_handle_at Summary: Also move existing readlink msan interceptor to sanitizer_common. Fixes google/sanitizers#908 Patch by Oliver Chang Reviewers: vitalybuka, eugenis Reviewed By: vitalybuka Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D42630 llvm-svn: 323825
* [Sanitizers] Export aligned new/delete from runtimes.Alex Shlyapnikov2017-12-231-3/+3
| | | | | | | | | | | | | | | | 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 llvm-svn: 321394
* [Sanitizers] Disable new_delete_test.cc on Android until it's supported.Alex Shlyapnikov2017-12-221-2/+2
| | | | llvm-svn: 321374
* [MSan,TSan] Add aligned new/delete interceptors.Alex Shlyapnikov2017-12-221-0/+80
| | | | | | | | | | | | | | | 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 llvm-svn: 321365
* [tsan] Fix sigaction implementation when it's called only to get handlerVitaly Buka2017-11-201-3/+12
| | | | | | | | | | Reviewers: eugenis Subscribers: kubamracek, llvm-commits, krytarowski Differential Revision: https://reviews.llvm.org/D40272 llvm-svn: 318707
OpenPOWER on IntegriCloud