[compiler-rt] Reapply "[scudo] Apply the min release threshold to the group" (#112252) (PR #112266)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 14 14:30:08 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-compiler-rt-sanitizer
Author: None (ChiaHungDuan)
<details>
<summary>Changes</summary>
This reverts commit 037938d637b830332e50232d7b90b5faad039c11.
Fixed the iterator to avoid infinite loop
---
Full diff: https://github.com/llvm/llvm-project/pull/112266.diff
1 Files Affected:
- (modified) compiler-rt/lib/scudo/standalone/primary64.h (+5)
``````````diff
diff --git a/compiler-rt/lib/scudo/standalone/primary64.h b/compiler-rt/lib/scudo/standalone/primary64.h
index 97188a5ac235cc..e382e01f5d8e54 100644
--- a/compiler-rt/lib/scudo/standalone/primary64.h
+++ b/compiler-rt/lib/scudo/standalone/primary64.h
@@ -1492,6 +1492,11 @@ template <typename Config> class SizeClassAllocator64 {
}
const uptr PushedBytesDelta = BytesInBG - BG->BytesInBGAtLastCheckpoint;
+ if (PushedBytesDelta < getMinReleaseAttemptSize(BlockSize)) {
+ Prev = BG;
+ BG = BG->Next;
+ continue;
+ }
// Given the randomness property, we try to release the pages only if the
// bytes used by free blocks exceed certain proportion of group size. Note
``````````
</details>
https://github.com/llvm/llvm-project/pull/112266
More information about the llvm-commits
mailing list