summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2015-08-05 15:13:33 +0000
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2015-08-05 15:13:33 +0000
commit975998bf6af72d38006b662f71050bf79127ddd2 (patch)
treea10886c5df4fe082f85d6a74facf9d049f78d0b8 /compiler-rt/test
parentb6a79f9916f6b676e2ad250b9e125d9f7b165fe5 (diff)
downloadbcm5719-llvm-975998bf6af72d38006b662f71050bf79127ddd2.tar.gz
bcm5719-llvm-975998bf6af72d38006b662f71050bf79127ddd2.zip
[asan] Enable asan for aarch64
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
Diffstat (limited to 'compiler-rt/test')
-rw-r--r--compiler-rt/test/asan/TestCases/Linux/read_binary_name_regtest.c4
-rw-r--r--compiler-rt/test/asan/TestCases/Linux/static_tls.cc2
-rw-r--r--compiler-rt/test/asan/lit.cfg2
-rw-r--r--compiler-rt/test/sanitizer_common/TestCases/Posix/decorate_proc_maps.cc1
4 files changed, 7 insertions, 2 deletions
diff --git a/compiler-rt/test/asan/TestCases/Linux/read_binary_name_regtest.c b/compiler-rt/test/asan/TestCases/Linux/read_binary_name_regtest.c
index 0e408d0e366..b09096c89cb 100644
--- a/compiler-rt/test/asan/TestCases/Linux/read_binary_name_regtest.c
+++ b/compiler-rt/test/asan/TestCases/Linux/read_binary_name_regtest.c
@@ -14,6 +14,10 @@
#include <linux/filter.h>
#include <linux/seccomp.h>
+#ifndef __NR_readlink
+# define __NR_readlink __NR_readlinkat
+#endif
+
#define syscall_nr (offsetof(struct seccomp_data, nr))
void corrupt() {
diff --git a/compiler-rt/test/asan/TestCases/Linux/static_tls.cc b/compiler-rt/test/asan/TestCases/Linux/static_tls.cc
index 785228b2923..6e9724f328f 100644
--- a/compiler-rt/test/asan/TestCases/Linux/static_tls.cc
+++ b/compiler-rt/test/asan/TestCases/Linux/static_tls.cc
@@ -9,7 +9,7 @@
// CHECK: __tls_get_addr: static tls
// CHECK: after
-// XFAIL: powerpc64
+// XFAIL: powerpc64, aarch64
#ifndef SHARED
#include <stdio.h>
diff --git a/compiler-rt/test/asan/lit.cfg b/compiler-rt/test/asan/lit.cfg
index a80b03ba39f..0805dbc3edf 100644
--- a/compiler-rt/test/asan/lit.cfg
+++ b/compiler-rt/test/asan/lit.cfg
@@ -164,7 +164,7 @@ config.substitutions.append( ("%xdynamiclib_namespec", '$(basename %t).dynamic')
# Allow tests to use REQUIRES=stable-runtime. For use when you cannot use XFAIL
# because the test hangs.
-if config.target_arch != 'arm':
+if config.target_arch != 'arm' or config.target_arch != 'aarch64':
config.available_features.add('stable-runtime')
# Turn on leak detection on 64-bit Linux.
diff --git a/compiler-rt/test/sanitizer_common/TestCases/Posix/decorate_proc_maps.cc b/compiler-rt/test/sanitizer_common/TestCases/Posix/decorate_proc_maps.cc
index 62247176765..081381a80e2 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/Posix/decorate_proc_maps.cc
+++ b/compiler-rt/test/sanitizer_common/TestCases/Posix/decorate_proc_maps.cc
@@ -1,5 +1,6 @@
// RUN: %clangxx -g %s -o %t
// RUN: %tool_options=decorate_proc_maps=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-%tool_name
+// REQUIRES: stable-release
#include <errno.h>
#include <fcntl.h>
#include <pthread.h>
OpenPOWER on IntegriCloud