diff --git a/compiler-rt/lib/scudo/standalone/combined.h b/compiler-rt/lib/scudo/standalone/combined.h --- a/compiler-rt/lib/scudo/standalone/combined.h +++ b/compiler-rt/lib/scudo/standalone/combined.h @@ -1155,7 +1155,8 @@ // address tag in the first byte of the chunk. void storeEndMarker(uptr End, uptr Size, uptr BlockEnd) { uptr UntaggedEnd = untagPointer(End); - if (UntaggedEnd != BlockEnd) { + uptr UntaggedBlockEnd = untagPointer(BlockEnd); + if (UntaggedEnd != UntaggedBlockEnd) { storeTag(UntaggedEnd); if (Size == 0) *reinterpret_cast(UntaggedEnd) = extractTag(End);