summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test/asan/TestCases/Linux
Commit message (Collapse)AuthorAgeFilesLines
...
* Attempt to fix asan's ptrace.cc on the clang-cmake-mips builder after r251331.Daniel Sanders2015-10-271-1/+1
| | | | llvm-svn: 251379
* [asan] Mark 5 tests unsupported on Android.Evgeniy Stepanov2015-10-261-0/+1
| | | | llvm-svn: 251362
* [compiler-rt] Fix ptrace interceptor for aarch64Adhemerval Zanella2015-10-261-12/+80
| | | | | | | | | | | | | | This patch fixes the ptrace interceptor for aarch64. The PTRACE_GETREGSET ptrace syscall with with invalid memory might zero the iovec::iov_base field and then masking the subsequent check after the syscall (since it will be 0 and it will not trigger an invalid access). The fix is to copy the value on a local variable and use its value on the checks. The patch also adds more coverage on the Linux/ptrace.cc testcase by addding check for PTRACE_GETREGSET for both general and floating registers (aarch64 definitions added only). llvm-svn: 251331
* [asan][mips] Fix ABI incompatibility crash in pthread_create() following ↵Daniel Sanders2015-10-051-1/+0
| | | | | | | | r248325. Like i386, Mips needs a versioned interceptor but must select GLIBC_2.2. llvm-svn: 249307
* [asan] Disable pthread_create_version test on mips.Evgeniy Stepanov2015-10-021-0/+1
| | | | llvm-svn: 249191
* [asan] Add missing -pthread in tests.Evgeniy Stepanov2015-09-221-1/+1
| | | | llvm-svn: 248332
* [asan] Versioned interceptor for pthread_create.Evgeniy Stepanov2015-09-221-0/+23
| | | | | | | | | This fixes a crash in pthread_create on linux/i386 due to abi incompatibility between intercepted and non-intercepted functions. See the test case for more details. llvm-svn: 248325
* [ASan] Add test for .preinit_array/.init_array/.fini_array sections.Alexey Samsonov2015-09-151-0/+24
| | | | llvm-svn: 247737
* [ASan] More ASAN_OPTIONS churn: use %env_asan_opts where applicable.Alexey Samsonov2015-08-2518-55/+53
| | | | | | | | | | Reviewers: filcab, rnk, kubabrecka Subscribers: tberghammer, danalbert, srhines, llvm-commits Differential Revision: http://reviews.llvm.org/D12305 llvm-svn: 245962
* [asan] Enable asan for aarch64Adhemerval Zanella2015-08-052-1/+5
| | | | | | | | | | | | | | | | This patch enables asan for aarch64/linux. It marks it as 'unstable-release', since some tests are failing due either kernel missing support of non-executable pages in mmap or environment instability (infinite loop in juno reference boards). It sets decorate_proc_maps test to require stable-release, since the test expects the shadow memory to not be executable and the support for aarch64 is only added recently by Linux (da141706aea52c1a9 - 4.0). It also XFAIL static_tls test for aarch64 linker may omit the __tls_get_addr call as a TLS optimization. llvm-svn: 244054
* [asan] XFAIL 1 test on Android.Evgeniy Stepanov2015-07-291-0/+1
| | | | | | | The test uses source file relative paths which does not work when the test is executed on a remote device. llvm-svn: 243564
* [asan] Read process name from /proc/self/cmdline on Linux.Evgeniy Stepanov2015-07-281-0/+70
| | | | | | | | | | Rename getBinaryBasename() to getProcessName() and, on Linux, read it from /proc/self/cmdline instead of /proc/self/exe. The former can be modified by the process. The main motivation is Android, where application processes re-write cmdline to a package name. This lets us setup per-application ASAN_OPTIONS through include=/some/path/%b. llvm-svn: 243473
* Fix typo from r243418. Should fix the failing `abort_on_error.cc` test.Kuba Brecka2015-07-281-1/+1
| | | | | | See http://reviews.llvm.org/D7203 llvm-svn: 243426
* [asan] Set abort_on_error=1 by default on OS XKuba Brecka2015-07-281-0/+18
| | | | | | | | This sets the default ASan flags to abort_on_error=1 on OS X. For unit tests and lit tests we set ASAN_OPTIONS back to abort_on_error=0 before running the tests (to avoid crashing). I added two tests that intentionally don't respect the default ASAN_OPTIONS to test the behavior of an empty ASAN_OPTIONS (on OS X we should crash, on Linux we should exit()). Differential Revision: http://reviews.llvm.org/D7203 llvm-svn: 243418
* [asan] Rename the ABI versioning symbol to '__asan_version_mismatch_check' ↵Kuba Brecka2015-07-231-1/+1
| | | | | | | | | | instead of abusing '__asan_init' We currently version `__asan_init` and when the ABI version doesn't match, the linker gives a `undefined reference to '__asan_init_v5'` message. From this, it might not be obvious that it's actually a version mismatch error. This patch makes the error message much clearer by changing the name of the undefined symbol to be `__asan_version_mismatch_check_xxx` (followed by the version string). We obviously don't want the initializer to be named like that, so it's a separate symbol that is used only for the purpose of version checking. Reviewed at http://reviews.llvm.org/D11004 llvm-svn: 243004
* [ASan] PR24150: restrict test case to i386.Alexey Samsonov2015-07-161-1/+1
| | | | llvm-svn: 242449
* [asan] relax the test case to allow either 'malloc' or ↵Kostya Serebryany2015-07-081-1/+1
| | | | | | '__interceptor_malloc' ; PR22681 llvm-svn: 241755
* [asan] Suppress read_binary_name_regtest.c test failure on unsupported hosts.Evgeniy Stepanov2015-06-301-2/+4
| | | | | | | read_binary_name_regtest.c requires seccomp kernel headers. Make the test pass if <linux/seccomp.h> is missing. llvm-svn: 241119
* [ASan] Add a regression test for r240960 (https://crbug.com/502974)Alexander Potapenko2015-06-301-0/+48
| | | | | | | The test simulates a sandbox that prevents the program from calling readlink(). ASan is supposed to still be able to print the executable name regardless of that. llvm-svn: 241072
* [asan] Re-enable clang_gcc_abi test at higher opt levels.Evgeniy Stepanov2015-06-291-5/+5
| | | | | | PR23971 is fixed. llvm-svn: 240975
* [asan] Disable 3 tests on Android.Evgeniy Stepanov2015-06-261-0/+4
| | | | | | Different reasons for failing; see source file comments. llvm-svn: 240858
* [asan] Enable 2 tests on Android.Evgeniy Stepanov2015-06-261-5/+0
| | | | | | Due to bionic improvements and "recent" sized-delete changes in clang. llvm-svn: 240856
* [asan] Disable -O1,-O2,-O3 in clang_gcc_abi.cc test.Evgeniy Stepanov2015-06-261-3/+4
| | | | | | | A workaround for PR23971. Fixes the test on Android. llvm-svn: 240855
* [ASan tests] Revert a bad change from r239754Filipe Cabecinhas2015-06-151-1/+1
| | | | | | Hopefully the last partial revert. Sorry about the noise. llvm-svn: 239785
* [ASan tests] Use export, not env.Filipe Cabecinhas2015-06-151-1/+1
| | | | llvm-svn: 239771
* [ASan] Test churn for setting ASAN_OPTIONS=symbolize_vs_style=falseFilipe Cabecinhas2015-06-1520-56/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This commit adds symbolize_vs_style=false to every instance of ASAN_OPTIONS in the asan tests and sets ASAN_OPTIONS=symbolize_vs_style=false in lit, for tests which don't set it. This way we don't need to make the tests be able to deal with both symbolize styles. This is the first patch in the series. I will eventually submit for the other sanitizers too. We need this change (or another way to deal with the different outputs) in order to be able to default to symbolize_vs_style=true on some platforms. Adding to this change, I'm also adding "env " before any command line which sets environment variables. That way the test works on other host shells, like we have if the host is running Windows. Reviewers: samsonov, kcc, rnk Subscribers: tberghammer, llvm-commits Differential Revision: http://reviews.llvm.org/D10294 llvm-svn: 239754
* [ASan] New approach to dynamic allocas unpoisoning. Patch by Max Ostapenko!Yury Gribov2015-05-281-0/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D7098 llvm-svn: 238401
* [asan] Disable static-tls test on PowerPC.Evgeniy Stepanov2015-05-171-0/+2
| | | | llvm-svn: 237534
* [sanitizer] Recognize static TLS in __tls_get_addr interceptor.Evgeniy Stepanov2015-05-161-0/+27
| | | | | | | Current code tries to find the dynamic TLS header to the left of the TLS block without checking that it's not a static TLS allocation. llvm-svn: 237495
* [sanitizer] Override pipefail in coverage-missing test.Sergey Matveev2015-05-121-8/+2
| | | | | | This should finally fix it. llvm-svn: 237147
* [sanitizer] Re-enable a broken test with debug output.Sergey Matveev2015-05-121-1/+7
| | | | llvm-svn: 237137
* [asan] Disable coverage-missing test failing on the bots.Evgeniy Stepanov2015-05-111-1/+1
| | | | llvm-svn: 237049
* [sanitizer] Attempt to fix the test for missing coverage script.Sergey Matveev2015-05-081-6/+7
| | | | llvm-svn: 236877
* [ASAN] Use regex for addresses in kernel_area.cc testSagar Thakur2015-05-081-6/+6
| | | | | | | | | | | This test was failing on mips because mips addresses are 40-bit long. Using regex for address solves this issue. Reviewers: dsanders, kcc, samsonov Subscribers: llvm-commits, mohit.bhakkad, jaydeep Differential Revision: http://reviews.llvm.org/D9516 llvm-svn: 236844
* [SanitizerCoverage] Upgrade lit tests to new -fsanitize-coverage= flags.Alexey Samsonov2015-05-071-3/+3
| | | | llvm-svn: 236796
* [sanitizer] Restrict the missing coverage test to x86/x86_64.Sergey Matveev2015-05-061-0/+1
| | | | | | Contrary to my hopes, it didn't magically work on other platforms. llvm-svn: 236645
* [sanitizer] Extend sancov.py to show which PCs are missing from coverage.Sergey Matveev2015-05-061-0/+82
| | | | | | | | Example usage: sancov.py print a.out.1234.sancov | sancov.py missing a.out llvm-svn: 236637
* [ASan] Make the remaining coverage tests pass on Darwin, move them to Posix/Alexander Potapenko2015-04-016-384/+0
| | | | | | | | | This CL: - moves PrepareForSandboxing() to sanitizer_posix_libcdep.cc - fixes the coverage tests to use flag substitutions defined in r233802 and not rely on hardcoded shared library names - moves those tests to TestCases/Posix so that they can be executed on Darwin llvm-svn: 233828
* [ASan] Deduplicate interception-in-shared-lib-test.cc by introducing ↵Alexander Potapenko2015-04-011-32/+0
| | | | | | | | | platform-specific substitutions for rpath linker flags Also make suppressions-library.cc use the same flags to avoid warnings about unused -rpath flags. The same substitutions will be used to make coverage tests work on both Linux and Darwin without duplicating the code. llvm-svn: 233802
* [ASan] Remove XFAIL from now passing test.Alexey Samsonov2015-03-231-1/+1
| | | | llvm-svn: 233040
* [ASan] Distinguish between read, write and read-write file access modes in ↵Alexander Potapenko2015-03-231-83/+0
| | | | | | | | OpenFile. This is to fix mapping coverage files into memory on OSX. llvm-svn: 232936
* [asan] update the sized_delete_test following the change of clang flags in ↵Kostya Serebryany2015-03-201-1/+2
| | | | | | r232788. llvm-svn: 232845
* [ASan] Move the coverage tests that work on Darwin to common testcase dir.Alexander Potapenko2015-03-2010-416/+0
| | | | llvm-svn: 232808
* [sanitizer] fix 'sancov.py merge' and add a test for itKostya Serebryany2015-03-191-1/+11
| | | | llvm-svn: 232763
* [sanitizer] add run-time a flag coverage_order_pcs. When true, the PCs are ↵Kostya Serebryany2015-03-181-0/+56
| | | | | | dumped in the order of their appearance llvm-svn: 232573
* asan: optimization experimentsDmitry Vyukov2015-03-171-0/+12
| | | | | | | | | | | | | | | | | | | | The experiments can be used to evaluate potential optimizations that remove instrumentation (assess false negatives). Instead of completely removing some instrumentation, you set Exp to a non-zero value (mask of optimization experiments that want to remove instrumentation of this instruction). If Exp is non-zero, this pass will emit special calls into runtime (e.g. __asan_report_exp_load1 instead of __asan_report_load1). These calls make runtime terminate the program in a special way (with a different exit status). Then you run the new compiler on a buggy corpus, collect the special terminations (ideally, you don't see them at all -- no false negatives) and make the decision on the optimization. The exact reaction to experiments in runtime is not implemented in this patch. It will be defined and implemented in a subsequent patch. http://reviews.llvm.org/D8198 llvm-svn: 232501
* asan: fix leak test for power platformDmitry Vyukov2015-03-101-1/+1
| | | | | | | | Power is 64-bit but does not support leak detection, so this test fails. Use the more robust leak-detection predicate instead. llvm-svn: 231782
* [sanitizer] fix instrumentation with -mllvm ↵Kostya Serebryany2015-03-101-0/+2
| | | | | | -sanitizer-coverage-block-threshold=0 to actually do something useful. llvm-svn: 231736
* [asan] Fix 2 problems in nohugepage_test.Kostya Serebryany2015-03-061-2/+18
| | | | | | | | | | | 1. /proc/self/smaps may be bigger than 1 << 14. On my machine, it is 26KB. 2. The read system call may return a partially filled buffer. We need to check the return value from read. Patch by H.J. Lu llvm-svn: 231502
* [sanitizer] Reconstruct the function that dumps block/edge coverage, ↵Kostya Serebryany2015-03-053-7/+7
| | | | | | hopefully making it more robust. Also increase the allowed coverage size on 32-bit. llvm-svn: 231413
OpenPOWER on IntegriCloud