Skip to content

Commit 680ffe3

Browse files
committed
[scudo] Fix isOwned on MTE devices.
If called on address that is actually not owned, the tags could not match. Disable tag checks in isOwned().
1 parent f957d08 commit 680ffe3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compiler-rt/lib/scudo/standalone/combined.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -785,6 +785,8 @@ class Allocator {
785785
// A corrupted chunk will not be reported as owned, which is WAI.
786786
bool isOwned(const void *Ptr) {
787787
initThreadMaybe();
788+
// If the allocation is not owned, the tags could be wrong.
789+
ScopedDisableMemoryTagChecks x;
788790
#ifdef GWP_ASAN_HOOKS
789791
if (GuardedAlloc.pointerIsMine(Ptr))
790792
return true;

0 commit comments

Comments
 (0)