From e17b658fc75337c1de0cdd467f35cfa4a85939b1 Mon Sep 17 00:00:00 2001 From: Evgeniy Stepanov Date: Mon, 21 Oct 2019 23:57:12 +0000 Subject: [PATCH] [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. llvm-svn: 375471 --- compiler-rt/test/hwasan/TestCases/try-catch.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/compiler-rt/test/hwasan/TestCases/try-catch.cpp b/compiler-rt/test/hwasan/TestCases/try-catch.cpp index ce1a92b..8e35a9d 100644 --- a/compiler-rt/test/hwasan/TestCases/try-catch.cpp +++ b/compiler-rt/test/hwasan/TestCases/try-catch.cpp @@ -1,7 +1,8 @@ -// RUN: %clangxx_hwasan %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=GOOD -// RUN: %clangxx_hwasan -DNO_SANITIZE_F %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=GOOD -// RUN: %clangxx_hwasan_oldrt %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=GOOD -// RUN: %clangxx_hwasan_oldrt %s -mllvm -hwasan-instrument-landing-pads=0 -o %t && not %run %t 2>&1 | FileCheck %s --check-prefix=BAD +// This test is broken with shared libstdc++ / libc++ on Android. +// RUN: %clangxx_hwasan -static-libstdc++ %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=GOOD +// RUN: %clangxx_hwasan -static-libstdc++ -DNO_SANITIZE_F %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=GOOD +// RUN: %clangxx_hwasan_oldrt -static-libstdc++ %s -o %t && %run %t 2>&1 | FileCheck %s --check-prefix=GOOD +// 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 // C++ tests on x86_64 require instrumented libc++/libstdc++. // REQUIRES: aarch64-target-arch -- 2.7.4