[compiler-rt] [scudo] Update secondary cache time-based release logic (PR #107507)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 17 12:28:25 PDT 2024
================
@@ -334,9 +336,6 @@ class MapAllocatorCache {
}
insert(Entry);
----------------
ChiaHungDuan wrote:
The reason why I'm sure if MTE is causing the problem is that we fixed a [bug](https://github.com/llvm/llvm-project/pull/107927) which caused some problem on MTE enabled devices. If the qemu has MTE enabled, I suppose it would catch the bug as well but it didn't (To be fair, it has the chance that the tests were not good enough to catch it in the past). Although I tend to believe the problem is what we are discussing here, just need some time to double check.
About
```
Instead of inserting the released entry at the head of the list, we could simply insert it after LastUnreleasedEntry to preserve the LRU ordering.
```
I would prefer handling the `LastUnreleasedEntry` in store() otherwise you need to know if the pages are released in the insert() function which is supposed to only handle the list insertion. In addition, at the time we remove the `Time`, it implies that we may need to pass another argument to convey the pages status. So I'm leaning toward handing them in store() but I'm not sure if there's any other restrictions.
https://github.com/llvm/llvm-project/pull/107507
More information about the llvm-commits
mailing list