[compiler-rt] [scudo] Update secondary cache time-based release logic (PR #107507)

Joshua Baehring via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 17 16:26:29 PDT 2024


================
@@ -321,9 +322,10 @@ class MapAllocatorCache {
         }
         CachedBlock PrevEntry = Quarantine[QuarantinePos];
         Quarantine[QuarantinePos] = Entry;
-        if (OldestTime == 0)
-          OldestTime = Entry.Time;
         Entry = PrevEntry;
+        // Update the entry time to reflect the time that the
+        // quarantined memory is placed in the Entries array
+        Entry.Time = Time;
----------------
JoshuaMBa wrote:

Right, I will add a conditional to account for that case in the revised pull request.

https://github.com/llvm/llvm-project/pull/107507


More information about the llvm-commits mailing list