Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Commit a3697b7

Browse files
committed
[hwasan] Workaround unwinder issues in try-catch test.
Android links the unwinder library to every DSO. The problem is, unwinder has global state, and hwasan implementation of personality function wrapper happens to rub it the wrong way. Switch the test to static libc++ as a temporary workaround. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@375471 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 89a8e62 commit a3697b7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/hwasan/TestCases/try-catch.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
// RUN: %clangxx_hwasan %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=GOOD
2-
// RUN: %clangxx_hwasan -DNO_SANITIZE_F %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=GOOD
3-
// RUN: %clangxx_hwasan_oldrt %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=GOOD
4-
// RUN: %clangxx_hwasan_oldrt %s -mllvm -hwasan-instrument-landing-pads=0 -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=BAD
1+
// This test is broken with shared libstdc++ / libc++ on Android.
2+
// RUN: %clangxx_hwasan -static-libstdc++ %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=GOOD
3+
// RUN: %clangxx_hwasan -static-libstdc++ -DNO_SANITIZE_F %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=GOOD
4+
// RUN: %clangxx_hwasan_oldrt -static-libstdc++ %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=GOOD
5+
// RUN: %clangxx_hwasan_oldrt -static-libstdc++ %s -mllvm -hwasan-instrument-landing-pads=0 -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=BAD
56

67
// C++ tests on x86_64 require instrumented libc++/libstdc++.
78
// REQUIRES: aarch64-target-arch

0 commit comments

Comments
 (0)