From: fernandosalas Date: Fri, 30 Jun 2023 20:55:40 +0000 (+0000) Subject: [scudo] Improve Secondary Cache Dump X-Git-Tag: upstream/17.0.6~3204 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=85c622b5978ff1209130aff0634aa770de5d86ef;p=platform%2Fupstream%2Fllvm.git [scudo] Improve Secondary Cache Dump Exclude cached blocks with invalid start address. Mainly concerned with cached blocks that are still available/unused. Reviewed By: Chia-hungDuan, cferris Differential Revision: https://reviews.llvm.org/D154148 --- diff --git a/compiler-rt/lib/scudo/standalone/secondary.h b/compiler-rt/lib/scudo/standalone/secondary.h index 5217b71..105b154 100644 --- a/compiler-rt/lib/scudo/standalone/secondary.h +++ b/compiler-rt/lib/scudo/standalone/secondary.h @@ -143,9 +143,11 @@ public: EntriesCount, atomic_load_relaxed(&MaxEntriesCount), atomic_load_relaxed(&MaxEntrySize)); for (CachedBlock Entry : Entries) { + if (!Entry.CommitBase) + continue; Str->append("StartBlockAddress: 0x%zx, EndBlockAddress: 0x%zx, " "BlockSize: %zu\n", - Entry.CommitBase, (Entry.CommitBase + Entry.CommitSize), + Entry.CommitBase, Entry.CommitBase + Entry.CommitSize, Entry.CommitSize); } }