From fc75c272f6e45ce3e712fc34668f04fabc4b4763 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Fri, 28 Apr 2023 00:44:46 -0700 Subject: [PATCH] [NFC][HWASAN] Use named const instead of 0xf --- compiler-rt/lib/hwasan/hwasan_checks.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler-rt/lib/hwasan/hwasan_checks.h b/compiler-rt/lib/hwasan/hwasan_checks.h index 616199a..4ffd524 100644 --- a/compiler-rt/lib/hwasan/hwasan_checks.h +++ b/compiler-rt/lib/hwasan/hwasan_checks.h @@ -166,7 +166,7 @@ __attribute__((always_inline, nodebug)) static void CheckAddressSized(uptr p, __builtin_unreachable(); } uptr end = p + sz; - uptr tail_sz = end & 0xf; + uptr tail_sz = end & (kShadowAlignment - 1); if (UNLIKELY(tail_sz != 0 && !PossiblyShortTagMatches( *shadow_last, end & ~(kShadowAlignment - 1), tail_sz))) { -- 2.7.4