diff --git a/compiler-rt/lib/hwasan/hwasan_fuchsia.cpp b/compiler-rt/lib/hwasan/hwasan_fuchsia.cpp index b066d4fdd114..967c796c339d 100644 --- a/compiler-rt/lib/hwasan/hwasan_fuchsia.cpp +++ b/compiler-rt/lib/hwasan/hwasan_fuchsia.cpp @@ -190,11 +190,11 @@ void InitializeOsSupport() { uint32_t features = 0; CHECK_EQ(zx_system_get_features(ZX_FEATURE_KIND_ADDRESS_TAGGING, &features), ZX_OK); - if (features != ZX_ARM64_FEATURE_ADDRESS_TAGGING_TBI && + if (!(features & ZX_ARM64_FEATURE_ADDRESS_TAGGING_TBI) && flags()->fail_without_syscall_abi) { Printf( - "FATAL: HWAddressSanitizer requires a kernel with tagged address " - "ABI.\n"); + "FATAL: HWAddressSanitizer requires " + "ZX_ARM64_FEATURE_ADDRESS_TAGGING_TBI.\n"); Die(); } #endif