Skip to content

Commit

Permalink
Always mprotect the secondary
Browse files Browse the repository at this point in the history
  • Loading branch information
pcc committed Apr 29, 2021
1 parent 74d9a76 commit 307c1c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler-rt/lib/scudo/standalone/secondary.h
Expand Up @@ -141,7 +141,7 @@ template <typename Config> class MapAllocatorCache {
Entry.BlockBegin = reinterpret_cast<uptr>(H + 1);
Entry.Data = H->Data;
Entry.Time = Time;
if (useMemoryTagging<Config>(Options)) {
if (1) {
if (Interval == 0 && !SCUDO_FUCHSIA) {
// Release the memory and make it inaccessible at the same time by
// creating a new MAP_NOACCESS mapping on top of the existing mapping.
Expand Down Expand Up @@ -243,7 +243,7 @@ template <typename Config> class MapAllocatorCache {
*H = reinterpret_cast<LargeBlock::Header *>(
LargeBlock::addHeaderTag<Config>(HeaderPos));
*Zeroed = Entry.Time == 0;
if (useMemoryTagging<Config>(Options))
if (1)
setMemoryPermission(Entry.CommitBase, Entry.CommitSize, 0, &Entry.Data);
uptr NewBlockBegin = reinterpret_cast<uptr>(*H + 1);
if (useMemoryTagging<Config>(Options)) {
Expand Down

0 comments on commit 307c1c4

Please sign in to comment.