Skip to content

Commit e15fcd7

Browse files
authored
[scudo] Use the releaseAndZeroPagesToOS function. (#71256)
All of the code assumes that when the pages are released, the entry is zero'd, so use the correct function. On most systems, this does not change anything.
1 parent f4df0c4 commit e15fcd7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ template <typename Config> class MapAllocatorCache {
223223
MAP_NOACCESS);
224224
}
225225
} else if (Interval == 0) {
226-
Entry.MemMap.releasePagesToOS(Entry.CommitBase, Entry.CommitSize);
226+
Entry.MemMap.releaseAndZeroPagesToOS(Entry.CommitBase, Entry.CommitSize);
227227
Entry.Time = 0;
228228
}
229229
do {
@@ -441,7 +441,7 @@ template <typename Config> class MapAllocatorCache {
441441
OldestTime = Entry.Time;
442442
return;
443443
}
444-
Entry.MemMap.releasePagesToOS(Entry.CommitBase, Entry.CommitSize);
444+
Entry.MemMap.releaseAndZeroPagesToOS(Entry.CommitBase, Entry.CommitSize);
445445
Entry.Time = 0;
446446
}
447447

0 commit comments

Comments
 (0)