Skip to content

Commit a753c99

Browse files
authored
[scudo] Die when store is called on MapAllocatorNoCache objects. (#102403)
1 parent 408d82d commit a753c99

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,11 @@ template <typename Config> class MapAllocatorNoCache {
9595
return {};
9696
}
9797
void store(UNUSED Options Options, UNUSED uptr CommitBase,
98-
UNUSED uptr CommitSize, UNUSED uptr BlockBegin, MemMapT MemMap) {
99-
unmap(MemMap);
98+
UNUSED uptr CommitSize, UNUSED uptr BlockBegin,
99+
UNUSED MemMapT MemMap) {
100+
// This should never be called since canCache always returns false.
101+
UNREACHABLE(
102+
"It is not valid to call store on MapAllocatorNoCache objects.");
100103
}
101104

102105
bool canCache(UNUSED uptr Size) { return false; }

0 commit comments

Comments
 (0)