Skip to content

Commit

Permalink
[scudo] Use the releaseAndZeroPagesToOS function. (#71256)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cferris1000 authored Nov 6, 2023
1 parent f4df0c4 commit e15fcd7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler-rt/lib/scudo/standalone/secondary.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ template <typename Config> class MapAllocatorCache {
MAP_NOACCESS);
}
} else if (Interval == 0) {
Entry.MemMap.releasePagesToOS(Entry.CommitBase, Entry.CommitSize);
Entry.MemMap.releaseAndZeroPagesToOS(Entry.CommitBase, Entry.CommitSize);
Entry.Time = 0;
}
do {
Expand Down Expand Up @@ -441,7 +441,7 @@ template <typename Config> class MapAllocatorCache {
OldestTime = Entry.Time;
return;
}
Entry.MemMap.releasePagesToOS(Entry.CommitBase, Entry.CommitSize);
Entry.MemMap.releaseAndZeroPagesToOS(Entry.CommitBase, Entry.CommitSize);
Entry.Time = 0;
}

Expand Down

0 comments on commit e15fcd7

Please sign in to comment.