summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test/asan/TestCases/Linux
Commit message (Collapse)AuthorAgeFilesLines
...
* [ASan] Disable aligned_alloc-alignment.cc on ppc64beAlex Shlyapnikov2018-03-291-4/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D44404 llvm-svn: 328742
* [ASan] Disable aligned_alloc-alignment.cc test on gcc.Alex Shlyapnikov2018-03-281-0/+3
| | | | | | | | | This check "CHECK: {{#0 0x.* in .*aligned_alloc}}" fails on ppc64be, gcc build. Disabling the test for gcc for now. Differential Revision: https://reviews.llvm.org/D44404 llvm-svn: 328741
* [ASan] Disable aligned_alloc-alignment.cc on Android.Alex Shlyapnikov2018-03-281-1/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D44404 llvm-svn: 328734
* [ASan] Add aligned_alloc declaration to aligned_alloc-alignment.cc test.Alex Shlyapnikov2018-03-281-0/+2
| | | | | | | | aligned_alloc is not always defined in headers. Differential Revision: https://reviews.llvm.org/D44404 llvm-svn: 328726
* [ASan] Report proper ASan error on allocator failures instead of CHECK(0)-ingAlex Shlyapnikov2018-03-283-2/+24
| | | | | | | | | | | | | | | | | | 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
* [Sanitizers] Export aligned new/delete from runtimes.Alex Shlyapnikov2017-12-231-31/+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
* [asan] Add interceptor for printf_chkMaxim Ostapenko2017-12-185-0/+98
| | | | | | | | | | | | There could be a situation when a specific DSO was built with FORTIFY_SOURCE option. In case asan-ed binary link against that DSO, libasan can't handle the possible memory error because it does not have interceptors for spinrtf_chk, snprintf_chk, vprintf_chk, vsnprintf_chk, __fprintf_chk functions. Let's interceptors for them. Patch by Denis Khalikov. Differential Revision: https://reviews.llvm.org/D40951 llvm-svn: 320990
* Add missing signal.h header:Ismail Donmez2017-12-011-0/+1
| | | | | | | | | | | | | | | /havana/work/llvm/projects/compiler-rt/test/asan/TestCases/Linux/swapcontext_annotation.cc:158:20: error: variable has incomplete type 'struct sigaction' struct sigaction act = {}; ^ /havana/work/llvm/projects/compiler-rt/test/asan/TestCases/Linux/swapcontext_annotation.cc:158:10: note: forward declaration of 'sigaction' struct sigaction act = {}; ^ /havana/work/llvm/projects/compiler-rt/test/asan/TestCases/Linux/swapcontext_annotation.cc:160:17: error: use of undeclared identifier 'SIGPROF' if (sigaction(SIGPROF, &act, 0)) { ^ 2 errors generated. llvm-svn: 319532
* [asan] Properly mark or disable tests that only work with shadow scale of 3Walter Lee2017-11-166-8/+6
| | | | | | Differential Revision: https://reviews.llvm.org/D39774 llvm-svn: 318471
* Revert new ThinLTO ASAN test until lit support addedTeresa Johnson2017-11-091-55/+0
| | | | | | | This reverts commit r317723 and r317728. Will be re-added when support for LTO/ThinLTO added to test/asan/lit.cfg. llvm-svn: 317823
* [ThinLTO] New test needs to require LTOTeresa Johnson2017-11-081-0/+2
| | | | | | | Fix buildbot failures: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/5262/steps/annotate/logs/stdio llvm-svn: 317728
* [ThinLTO] Ensure sanitizer passes are runTeresa Johnson2017-11-081-0/+53
| | | | | | Recommit new test as linux-only. llvm-svn: 317723
* [Sanitizers] ASan: detect new/delete calls with mismatched alignment.Alex Shlyapnikov2017-10-251-0/+168
| | | | | | | | | | | | | | | | | | | ASan allocator stores the requested alignment for new and new[] calls and on delete and delete[] verifies that alignments do match. The representable alignments are: default alignment, 8, 16, 32, 64, 128, 256 and 512 bytes. Alignments > 512 are stored as 512, hence two different alignments > 512 will pass the check (possibly masking the bug), but limited memory requirements deemed to be a resonable tradeoff for relaxed conditions. The feature is controlled by new_delete_type_mismatch flag, the same one protecting new/delete matching size check. Differential revision: https://reviews.llvm.org/D38574 Issue: https://github.com/google/sanitizers/issues/799 llvm-svn: 316595
* [Sanitizers] New sanitizer API to purge allocator quarantine.Alex Shlyapnikov2017-10-231-6/+12
| | | | | | | | | | | | | | | | Summary: Purging allocator quarantine and returning memory to OS might be desired between fuzzer iterations since, most likely, the quarantine is not going to catch bugs in the code under fuzz, but reducing RSS might significantly prolong the fuzzing session. Reviewers: cryptoad Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D39153 llvm-svn: 316347
* [mips][asan] Fix preinstalled_signal.cc test for mipsSimon Dardis2017-09-261-0/+6
| | | | | | | | Linux for mips has a non-standard layout for the kernel sigaction struct. Adjust the layout by the minimally amount to get the test to pass, as we don't require the usage of the restorer function. llvm-svn: 314200
* [asan/lsan] Trying to fix PPC64 and x380x buildbots after r313966Maxim Ostapenko2017-09-221-1/+1
| | | | llvm-svn: 313974
* [asan/lsan] Trying to fix buildbots after r313966Maxim Ostapenko2017-09-221-0/+22
| | | | llvm-svn: 313967
* [ubsan] Fix interface_symbols_windows testVitaly Buka2017-09-181-2/+1
| | | | | | | | | | | | | | | Summary: 1. Update ubsan_interface.inc to make the test happy. 2. Switch interface_symbols_linux and interface_symbols_darwin to C++ to import __ubsan_handle_dynamic_type_cache_miss 3. Switch interface_symbols_windows to C++ for consistency. Reviewers: rnk, zturner Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D37986 llvm-svn: 313551
* [sanitizer] Support check-asan on AndroidVitaly Buka2017-09-161-0/+1
| | | | | | This patch enabled asan tests from sanitizer_common. llvm-svn: 313444
* [asan] Remove not-androidVitaly Buka2017-09-164-4/+4
| | | | | | Replaced with !android llvm-svn: 313440
* [asan] Fix tests broken by r312858Vitaly Buka2017-09-091-3/+3
| | | | llvm-svn: 312872
* [SanitizeCoverage] Enable stack-depth coverage for -fsanitize=fuzzerMatt Morehouse2017-08-301-0/+1
| | | | | | | | | | | | | | | | | | 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 llvm-svn: 312185
* Mark allocator_oom_test.cc unsupported on arm & aarch64 (PR33972)Hans Wennborg2017-08-241-1/+2
| | | | | | The buildbots don't seem to like it. llvm-svn: 311674
* [asan] Fix unsupported test on AndroidKostya Kortchinsky2017-08-041-1/+1
| | | | | | | | | | | | | | | | Summary: `pvalloc` appears to not be available on Android. Mark the failing test as unsupported on that platform. Reviewers: alekseyshl, vitalybuka Reviewed By: alekseyshl, vitalybuka Subscribers: srhines, kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D36339 llvm-svn: 310133
* [asan] Check for pvalloc overlowKostya Kortchinsky2017-08-041-0/+41
| | | | | | | | | | | | | | | | | | | | Summary: Last one of the `pvalloc` overflow checks! `CheckForPvallocOverflow` was introduced with D35818 to detect when `pvalloc` would wrap when rounding up to the next multiple of the page size. Add this check to ASan's `pvalloc` implementation. Reviewers: alekseyshl Reviewed By: alekseyshl Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D36257 llvm-svn: 310119
* [asan] Fix test on Android i686/fuguVitaly Buka2017-07-011-5/+11
| | | | | | printf from .preinit_array may crash. llvm-svn: 306940
* [asan] Disable test which fails on Android x86Vitaly Buka2017-06-301-1/+2
| | | | | | Other Android CPUs probably pass just by luck as ulimit was not executed. llvm-svn: 306914
* [asan] Disable tests which do no work on AndroidVitaly Buka2017-06-292-0/+6
| | | | llvm-svn: 306620
* Revert "[compiler-rt] Don't reset non-default user handler if ↵Vitaly Buka2017-06-211-21/+23
| | | | | | | | | | | | | | | | | allow_user_segv_handler is true." Summary: On Android we still need to reset preinstalled handlers and allow use handlers later. This reverts commit r304039. Reviewers: eugenis Subscribers: kubamracek, dberris, llvm-commits Differential Revision: https://reviews.llvm.org/D34434 llvm-svn: 305871
* [ASan] Disable allocator_oom_test.cc on s390Alex Shlyapnikov2017-06-201-0/+3
| | | | | | | | | | | | | | Summary: ASan shadow memory on s390 is larger than other configurations, let's disable this test for now (will revisit it later). Reviewers: eugenis Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D34414 llvm-svn: 305822
* [Sanitizers] Secondary allocator respects allocator_may_return_null=1.Alex Shlyapnikov2017-06-161-0/+82
| | | | | | | | | | | | | | | | | | Summary: Context: https://github.com/google/sanitizers/issues/740. Making secondary allocator to respect allocator_may_return_null=1 flag and return nullptr when "out of memory" happens. More changes in primary allocator and operator new will follow. Reviewers: eugenis Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D34243 llvm-svn: 305569
* [asan] Fix ASan internal failure in AllocateFromLocalPoolMaxim Ostapenko2017-06-091-0/+33
| | | | | | | | | | | | | | This patch addresses PR 33206. There might be a situation when dynamic ASan runtime initializes later than shared library which has malloc in static constructor (rtld doesn't provide an order of shared libs initialization). In this case ASan hasn't yet initialized interceptors, but already intercepts malloc. If malloc is too big to be handled by static local pool, ASan will die with error: Sanitizer CHECK failed: lib/asan/asan_malloc_linux.cc:40 ((allocated_for_dlsym)) < ((kDlsymAllocPoolSize)) (1036, 1024) Patch by Denis Khalikov. Differential Revision: https://reviews.llvm.org/D33784 llvm-svn: 305058
* [asan] fix one more case where stack-use-after-return is not ↵Kostya Serebryany2017-06-021-13/+20
| | | | | | async-signal-safe (during thread startup). beef-up the test to give it a chance to catch regressions. Also relax the lint to make C++11 more usable. llvm-svn: 304598
* [sanitizer-coverage] remove stale code (old coverage); compiler-rt part Kostya Serebryany2017-05-311-3/+3
| | | | llvm-svn: 304318
* [compiler-rt] Don't reset non-default user handler if ↵Vitaly Buka2017-05-261-0/+105
| | | | | | | | | | | | allow_user_segv_handler is true. Reviewers: eugenis, kcc Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D32457 llvm-svn: 304039
* [asan] relax sanbox_read_proc_self_maps_test to pass even if unshare() fails.Kostya Serebryany2017-05-251-5/+3
| | | | llvm-svn: 303911
* [asan] make asan under sandboxes more robustKostya Serebryany2017-05-151-0/+30
| | | | llvm-svn: 303132
* [ASAN] Add interceptor for __longjmp_chkPeter Wu2017-05-041-0/+51
| | | | | | | | | | | | | | | | | Summary: glibc on Linux calls __longjmp_chk instead of longjmp (or _longjmp) when _FORTIFY_SOURCE is defined. Ensure that an ASAN-instrumented program intercepts this function when a system library calls it, otherwise the stack might remain poisoned and result in CHECK failures and false positives. Fixes https://github.com/google/sanitizers/issues/721 Reviewed By: eugenis Differential Revision: https://reviews.llvm.org/D32408 llvm-svn: 302152
* [asan] Fix dead stripping of globals on Linux (compiler-rt).Evgeniy Stepanov2017-04-274-13/+52
| | | | | | | Third attempt. See the description of the corresponding commit in LLVM for more details. llvm-svn: 301588
* Mark a test as requiring a shell.Rafael Espindola2017-04-241-0/+1
| | | | llvm-svn: 301265
* [asan] move textdomain.c to Linux dir, as the test is Linux-specificKostya Serebryany2017-04-201-0/+10
| | | | llvm-svn: 300926
* Reapply "Enable LSan for arm Linux"Maxim Ostapenko2017-04-111-1/+1
| | | | | | This patch reapplies r299923 with typo fixed in BLX macros. llvm-svn: 299948
* Revert r299923, it doesn't build in bootstrap builds.Nico Weber2017-04-111-1/+1
| | | | | | | | | | | | | | | FAILED: lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.arm.dir/sanitizer_linux.cc.o lib/sanitizer_common/sanitizer_linux.cc:1340:24: error: invalid instruction BLX(ip) ^ lib/sanitizer_common/sanitizer_linux.cc:1313:19: note: expanded from macro 'BLX' # define BLX(R) "mov lr, pc; bx" #R "\n" ^ <inline asm>:6:13: note: instantiated into assembly here mov lr, pc; bxip ^~~~ llvm-svn: 299943
* [lsan] Enable LSan for arm LinuxMaxim Ostapenko2017-04-111-1/+1
| | | | | | | | This patch enables LSan for arm Linux. Differential Revision: https://reviews.llvm.org/D29586 llvm-svn: 299923
* Revert "[asan] Fix dead stripping of globals on Linux (compiler-rt)."Evgeniy Stepanov2017-04-104-52/+13
| | | | | | This reverts r299698, which caused a big increase in object file size. llvm-svn: 299881
* Use a temp file to avoid Process Substitution.Rafael Espindola2017-04-071-4/+5
| | | | | | Thanks to Reid Kleckner for the suggestion. llvm-svn: 299794
* [asan] Fix dead stripping of globals on Linux (compiler-rt).Evgeniy Stepanov2017-04-064-13/+52
| | | | | | This is a re-land of r298173, r298169, r298159. llvm-svn: 299698
* Replace a few uses of basename.Rafael Espindola2017-04-061-3/+2
| | | | | | | This replaces a few uses of basename with the recently introduced lit replacements. llvm-svn: 299693
* Don't remove the cwd.Rafael Espindola2017-04-041-0/+1
| | | | | | | | | | This works with a regular shell since the kernel can keep track of a deleted cwd. Since we just keep a path string, the following subprocess invocations fail. I think this would also fail on windows. llvm-svn: 299471
* Avoid sub shell.Rafael Espindola2017-04-041-2/+4
| | | | | | Another step in getting these tests to run with the integrated one. llvm-svn: 299452
OpenPOWER on IntegriCloud