diff --git a/compiler-rt/lib/scudo/standalone/combined.h b/compiler-rt/lib/scudo/standalone/combined.h index a5f1bc388e882..88fdc5943d6f8 100644 --- a/compiler-rt/lib/scudo/standalone/combined.h +++ b/compiler-rt/lib/scudo/standalone/combined.h @@ -785,6 +785,8 @@ class Allocator { // A corrupted chunk will not be reported as owned, which is WAI. bool isOwned(const void *Ptr) { initThreadMaybe(); + // If the allocation is not owned, the tags could be wrong. + ScopedDisableMemoryTagChecks x; #ifdef GWP_ASAN_HOOKS if (GuardedAlloc.pointerIsMine(Ptr)) return true;