[llvm] fix llvm-gsymutil verification (PR #141751)
via llvm-commits
llvm-commits at lists.llvm.org
Wed May 28 05:31:03 PDT 2025
https://github.com/peremyach created https://github.com/llvm/llvm-project/pull/141751
Verification crashed here https://github.com/llvm/llvm-project/blob/main/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp#L519
The reason being that we to extract inline_info we recreate compile unit dies. Assert fails because we previously cleaned up just the DIEs but some other fields remained initialized.
>From 1126c001ef8bceca8eb409778948660b6a55261a Mon Sep 17 00:00:00 2001
From: Arslan Khabutdinov <akhabutdinov at fb.com>
Date: Wed, 28 May 2025 05:28:42 -0700
Subject: [PATCH] fix llvm-gsymutil verification
---
llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp b/llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp
index 1f70d273a9d9d..640141463c107 100644
--- a/llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp
+++ b/llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp
@@ -713,6 +713,10 @@ llvm::Error DwarfTransformer::verify(StringRef GsymPath,
OutputAggregator &Out) {
Out << "Verifying GSYM file \"" << GsymPath << "\":\n";
+ for (const auto &CU : DICtx.compile_units()) {
+ CU->clear();
+ }
+
auto Gsym = GsymReader::openFile(GsymPath);
if (!Gsym)
return Gsym.takeError();
More information about the llvm-commits
mailing list