[compiler-rt] r333729 - [ASAN] Sanitize testsuite for ARM.
Yvan Roux via llvm-commits
llvm-commits at lists.llvm.org
Thu May 31 23:23:36 PDT 2018
Author: yroux
Date: Thu May 31 23:23:36 2018
New Revision: 333729
URL: http://llvm.org/viewvc/llvm-project?rev=333729&view=rev
Log:
[ASAN] Sanitize testsuite for ARM.
Address failures exhibited by ARMv8 bot in Thumb mode:
- Fix logic for fast unwinding support (i.e feature is not available for Thumb)
- Fix Unsupported and Requires rules to handle armv8 as well as soft and hard
float targets
- Un-xfail passing tests
Differential Revision: https://reviews.llvm.org/D47575
Modified:
compiler-rt/trunk/test/asan/TestCases/Linux/activation-options.cc
compiler-rt/trunk/test/asan/TestCases/Linux/allocator_oom_test.cc
compiler-rt/trunk/test/asan/TestCases/Linux/clang_gcc_abi.cc
compiler-rt/trunk/test/asan/TestCases/Linux/clone_test.cc
compiler-rt/trunk/test/asan/TestCases/Posix/glob.cc
compiler-rt/trunk/test/asan/TestCases/Posix/mmap_limit_mb.cc
compiler-rt/trunk/test/asan/TestCases/Posix/shared-lib-test.cc
compiler-rt/trunk/test/asan/TestCases/Posix/stack-use-after-return.cc
compiler-rt/trunk/test/asan/TestCases/Posix/start-deactivated.cc
compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test.cc
compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test2.cc
compiler-rt/trunk/test/asan/TestCases/heavy_uar_test.cc
compiler-rt/trunk/test/asan/TestCases/strdup_oob_test.cc
compiler-rt/trunk/test/asan/lit.cfg
Modified: compiler-rt/trunk/test/asan/TestCases/Linux/activation-options.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/activation-options.cc?rev=333729&r1=333728&r2=333729&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/activation-options.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/activation-options.cc Thu May 31 23:23:36 2018
@@ -28,7 +28,6 @@
// RUN: ASAN_ACTIVATION_OPTIONS=include=%t.asan.options.%b %run %t --fix-name 2>&1 | \
// RUN: FileCheck %s --check-prefix=CHECK-HELP --check-prefix=CHECK-FOUND
-// XFAIL: arm-linux-gnueabi
// XFAIL: android
#if !defined(SHARED_LIB)
Modified: compiler-rt/trunk/test/asan/TestCases/Linux/allocator_oom_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/allocator_oom_test.cc?rev=333729&r1=333728&r2=333729&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/allocator_oom_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/allocator_oom_test.cc Thu May 31 23:23:36 2018
@@ -32,7 +32,7 @@
// AArch64 bots fail on this test.
// TODO(alekseys): Android lit do not run ulimit on device.
// REQUIRES: shadow-scale-3
-// UNSUPPORTED: s390,android,arm,aarch64
+// UNSUPPORTED: s390,android,aarch64
#include <stdlib.h>
#include <string.h>
Modified: compiler-rt/trunk/test/asan/TestCases/Linux/clang_gcc_abi.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/clang_gcc_abi.cc?rev=333729&r1=333728&r2=333729&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/clang_gcc_abi.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/clang_gcc_abi.cc Thu May 31 23:23:36 2018
@@ -3,8 +3,7 @@
// RUN: %clangxx_asan -O2 -x c %s -o %t && not %run %t 2>&1 | FileCheck %s
// RUN: %clangxx_asan -O3 -x c %s -o %t && not %run %t 2>&1 | FileCheck %s
-// REQUIRES: arm-target-arch, fast-unwinder-works
-// XFAIL: armv7l-unknown-linux-gnueabihf
+// REQUIRES: (arm-target-arch || armhf-target-arch), fast-unwinder-works
#include <stdlib.h>
Modified: compiler-rt/trunk/test/asan/TestCases/Linux/clone_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Linux/clone_test.cc?rev=333729&r1=333728&r2=333729&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Linux/clone_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Linux/clone_test.cc Thu May 31 23:23:36 2018
@@ -5,7 +5,6 @@
// RUN: %clangxx_asan -O1 %s -o %t && %run %t | FileCheck %s
// RUN: %clangxx_asan -O2 %s -o %t && %run %t | FileCheck %s
// RUN: %clangxx_asan -O3 %s -o %t && %run %t | FileCheck %s
-// XFAIL: arm-linux-gnueabi
#include <stdio.h>
#include <sched.h>
Modified: compiler-rt/trunk/test/asan/TestCases/Posix/glob.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/glob.cc?rev=333729&r1=333728&r2=333729&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/glob.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/glob.cc Thu May 31 23:23:36 2018
@@ -4,7 +4,6 @@
//
// RUN: %clangxx_asan -O0 %s -o %t && %run %t %p 2>&1 | FileCheck %s
// RUN: %clangxx_asan -O3 %s -o %t && %run %t %p 2>&1 | FileCheck %s
-// XFAIL: arm-linux-gnueabi
#include <assert.h>
#include <glob.h>
Modified: compiler-rt/trunk/test/asan/TestCases/Posix/mmap_limit_mb.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/mmap_limit_mb.cc?rev=333729&r1=333728&r2=333729&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/mmap_limit_mb.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/mmap_limit_mb.cc Thu May 31 23:23:36 2018
@@ -9,7 +9,7 @@
// RUN: %env_asan_opts=mmap_limit_mb=300 not %run %t 500 1000000 2>&1 | FileCheck %s
//
// FIXME: Windows doesn't implement mmap_limit_mb.
-// XFAIL: arm-linux-gnueabi,win32
+// XFAIL: win32
#include <assert.h>
#include <stdlib.h>
Modified: compiler-rt/trunk/test/asan/TestCases/Posix/shared-lib-test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/shared-lib-test.cc?rev=333729&r1=333728&r2=333729&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/shared-lib-test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/shared-lib-test.cc Thu May 31 23:23:36 2018
@@ -6,7 +6,6 @@
// RUN: %clangxx_asan -O2 %s %libdl -o %t && not %run %t 2>&1 | FileCheck %s
// RUN: %clangxx_asan -O3 -DSHARED_LIB %s -fPIC -shared -o %t-so.so
// RUN: %clangxx_asan -O3 %s %libdl -o %t && not %run %t 2>&1 | FileCheck %s
-// XFAIL: arm-linux-gnueabi
#if !defined(SHARED_LIB)
#include <dlfcn.h>
Modified: compiler-rt/trunk/test/asan/TestCases/Posix/stack-use-after-return.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/stack-use-after-return.cc?rev=333729&r1=333728&r2=333729&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/stack-use-after-return.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/stack-use-after-return.cc Thu May 31 23:23:36 2018
@@ -17,8 +17,8 @@
// This test runs out of stack on AArch64.
// UNSUPPORTED: aarch64
-// FIXME: Fix this test for dynamic runtime on armhf-linux.
-// UNSUPPORTED: armhf-linux && asan-dynamic-runtime
+// FIXME: Fix this test for dynamic runtime on arm linux.
+// UNSUPPORTED: (arm-linux || armhf-linux) && asan-dynamic-runtime
#include <limits.h>
#include <pthread.h>
Modified: compiler-rt/trunk/test/asan/TestCases/Posix/start-deactivated.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/start-deactivated.cc?rev=333729&r1=333728&r2=333729&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/start-deactivated.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/start-deactivated.cc Thu May 31 23:23:36 2018
@@ -18,7 +18,6 @@
// RUN: %env_asan_opts=start_deactivated=1 \
// RUN: ASAN_ACTIVATION_OPTIONS=help=1,handle_segv=0,verbosity=1 not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK-UNSUPPORTED
-// XFAIL: arm-linux-gnueabi
// UNSUPPORTED: ios
// END.
Modified: compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test.cc?rev=333729&r1=333728&r2=333729&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test.cc Thu May 31 23:23:36 2018
@@ -7,7 +7,7 @@
// RUN: %clangxx_asan -O3 -xc %s -o %t && not %run %t 2>&1 | FileCheck %s
// Unwind problem on arm: "main" is missing from the allocation stack trace.
-// UNSUPPORTED: win32,s390,armv7l-unknown-linux-gnueabihf
+// UNSUPPORTED: win32,s390,arm && !fast-unwinder-works
#include <string.h>
Modified: compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test2.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test2.cc?rev=333729&r1=333728&r2=333729&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test2.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/Posix/strndup_oob_test2.cc Thu May 31 23:23:36 2018
@@ -7,7 +7,7 @@
// RUN: %clang_asan -O3 -xc %s -o %t && not %run %t 2>&1 | FileCheck %s
// Unwind problem on arm: "main" is missing from the allocation stack trace.
-// UNSUPPORTED: win32,s390,armv7l-unknown-linux-gnueabihf
+// UNSUPPORTED: win32,s390,arm && !fast-unwinder-works
#include <string.h>
@@ -19,4 +19,4 @@ int main(int argc, char **argv) {
// CHECK: AddressSanitizer: global-buffer-overflow
// CHECK: {{.*}}main {{.*}}.cc:[[@LINE-2]]
return *copy;
-}
\ No newline at end of file
+}
Modified: compiler-rt/trunk/test/asan/TestCases/heavy_uar_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/heavy_uar_test.cc?rev=333729&r1=333728&r2=333729&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/heavy_uar_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/heavy_uar_test.cc Thu May 31 23:23:36 2018
@@ -1,12 +1,12 @@
// RUN: %clangxx_asan -O0 %s -o %t && %env_asan_opts=detect_stack_use_after_return=1 not %run %t 2>&1 | FileCheck %s
// RUN: %clangxx_asan -O2 %s -o %t && %env_asan_opts=detect_stack_use_after_return=1 not %run %t 2>&1 | FileCheck %s
-// XFAIL: arm-linux-gnueabi,win32
+// XFAIL: win32
// FIXME: Fix this test under GCC.
// REQUIRES: Clang
-// FIXME: Fix this test for dynamic runtime on armhf-linux.
-// UNSUPPORTED: armhf-linux && asan-dynamic-runtime
+// FIXME: Fix this test for dynamic runtime on arm linux.
+// UNSUPPORTED: (arm-linux || armhf-linux) && asan-dynamic-runtime
// UNSUPPORTED: ios
Modified: compiler-rt/trunk/test/asan/TestCases/strdup_oob_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/strdup_oob_test.cc?rev=333729&r1=333728&r2=333729&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/TestCases/strdup_oob_test.cc (original)
+++ compiler-rt/trunk/test/asan/TestCases/strdup_oob_test.cc Thu May 31 23:23:36 2018
@@ -7,7 +7,7 @@
// RUN: %clangxx_asan -O3 -xc %s -o %t && not %run %t 2>&1 | FileCheck %s
// Unwind problem on arm: "main" is missing from the allocation stack trace.
-// UNSUPPORTED: armv7l-unknown-linux-gnueabihf
+// REQUIRES: (arm-target-arch || armhf-target-arch), fast-unwinder-works
// FIXME: We fail to intercept strdup with the dynamic WinASan RTL, so it's not
// in the stack trace.
Modified: compiler-rt/trunk/test/asan/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/lit.cfg?rev=333729&r1=333728&r2=333729&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/lit.cfg (original)
+++ compiler-rt/trunk/test/asan/lit.cfg Thu May 31 23:23:36 2018
@@ -168,7 +168,7 @@ config.substitutions.append( ("%libdl",
config.available_features.add("asan-" + config.bits + "-bits")
# Fast unwinder doesn't work with Thumb
-if re.search('mthumb', config.target_cflags) is not None:
+if re.search('mthumb', config.target_cflags) is None:
config.available_features.add('fast-unwinder-works')
# Turn on leak detection on 64-bit Linux.
More information about the llvm-commits
mailing list