mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-19 11:35:51 -04:00

This patch adds -fsanitize=kernel-hwaddress flag, that essentially enables -hwasan-kernel=1 -hwasan-recover=1 -hwasan-match-all-tag=0xff. Differential Revision: https://reviews.llvm.org/D45046 llvm-svn: 330044
27 lines
948 B
C++
27 lines
948 B
C++
// RUN: %clang_cc1 -E -fsanitize=address %s -o - | FileCheck --check-prefix=CHECK-ASAN %s
|
|
// RUN: %clang_cc1 -E -fsanitize=kernel-address %s -o - | FileCheck --check-prefix=CHECK-ASAN %s
|
|
// RUN: %clang_cc1 -E -fsanitize=hwaddress %s -o - | FileCheck --check-prefix=CHECK-HWASAN %s
|
|
// RUN: %clang_cc1 -E -fsanitize=kernel-hwaddress %s -o - | FileCheck --check-prefix=CHECK-HWASAN %s
|
|
// RUN: %clang_cc1 -E %s -o - | FileCheck --check-prefix=CHECK-NO-ASAN %s
|
|
|
|
#if __has_feature(address_sanitizer)
|
|
int AddressSanitizerEnabled();
|
|
#else
|
|
int AddressSanitizerDisabled();
|
|
#endif
|
|
|
|
#if __has_feature(hwaddress_sanitizer)
|
|
int HWAddressSanitizerEnabled();
|
|
#else
|
|
int HWAddressSanitizerDisabled();
|
|
#endif
|
|
|
|
// CHECK-ASAN: AddressSanitizerEnabled
|
|
// CHECK-ASAN: HWAddressSanitizerDisabled
|
|
|
|
// CHECK-HWASAN: AddressSanitizerDisabled
|
|
// CHECK-HWASAN: HWAddressSanitizerEnabled
|
|
|
|
// CHECK-NO-ASAN: AddressSanitizerDisabled
|
|
// CHECK-NO-ASAN: HWAddressSanitizerDisabled
|