mnadeem created this revision.
mnadeem added reviewers: hctim, vitalybuka, kstoimenov.
Herald added a subscriber: danielkiss.
Herald added a project: All.
mnadeem requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

In Android API < 30 there is no HWAsan instrumentation support for globals
so the test fails if API < 30 or if the target triple does not specify the API 
version.

Add `-mllvm -hwasan-globals` to enable global instrumentation.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D131806

Files:
  clang/test/CodeGen/sanitizer-special-case-list-globals.c


Index: clang/test/CodeGen/sanitizer-special-case-list-globals.c
===================================================================
--- clang/test/CodeGen/sanitizer-special-case-list-globals.c
+++ clang/test/CodeGen/sanitizer-special-case-list-globals.c
@@ -13,7 +13,7 @@
 /// first), which is hard to check for, as 'CHECK-DAG' doesn't play terribly
 /// nicely with 'CHECK-NOT'. This is why the 'always_ignored' and
 /// 'hwasan_ignored' comes first in this file.
-// RUN: %clang_cc1 -fsanitize=hwaddress -emit-llvm %s -o -\
+// RUN: %clang_cc1 -fsanitize=hwaddress -mllvm -hwasan-globals -emit-llvm %s 
-o -\
 // RUN: 
-fsanitize-ignorelist=%S/Inputs/sanitizer-special-case-list-globals.txt \
 // RUN: | FileCheck %s --check-prefix=HWASAN
 


Index: clang/test/CodeGen/sanitizer-special-case-list-globals.c
===================================================================
--- clang/test/CodeGen/sanitizer-special-case-list-globals.c
+++ clang/test/CodeGen/sanitizer-special-case-list-globals.c
@@ -13,7 +13,7 @@
 /// first), which is hard to check for, as 'CHECK-DAG' doesn't play terribly
 /// nicely with 'CHECK-NOT'. This is why the 'always_ignored' and
 /// 'hwasan_ignored' comes first in this file.
-// RUN: %clang_cc1 -fsanitize=hwaddress -emit-llvm %s -o -\
+// RUN: %clang_cc1 -fsanitize=hwaddress -mllvm -hwasan-globals -emit-llvm %s -o -\
 // RUN: -fsanitize-ignorelist=%S/Inputs/sanitizer-special-case-list-globals.txt \
 // RUN: | FileCheck %s --check-prefix=HWASAN
 
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to