[compiler-rt] [scudo] Skip special quarantine blocks in iterateOverChunks (PR #159892)

via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 19 21:21:12 PDT 2025


================
@@ -101,7 +101,8 @@ class Allocator {
       Chunk::UnpackedHeader Header = {};
       Header.ClassId = QuarantineClassId & Chunk::ClassIdMask;
       Header.SizeOrUnusedBytes = sizeof(QuarantineBatch);
-      Header.State = Chunk::State::Allocated;
+      // Do not use Allocated or this block will show up in iterateOverChunks.
----------------
ChiaHungDuan wrote:

Given that this is used for Quarantine batch and it does get quarantined as well. We may not need to mention `iterateOverChunk` which seems to be a workaround. Leaving it without comment or say it's also quarantined seems to be good enough to me.

BTW, maybe we want to consider rename this `allocate``deallocate` to something more specific to batch class like `pushBatchClassBlocks` in primary64.h. Just a minor suggestion, feel free to skip it.

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


More information about the llvm-commits mailing list