-
Notifications
You must be signed in to change notification settings - Fork 14.2k
fix llvm-gsymutil verification #141751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix llvm-gsymutil verification #141751
Conversation
@llvm/pr-subscribers-debuginfo Author: None (peremyach) ChangesVerification crashed here https://github.com/llvm/llvm-project/blob/main/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp#L519 Full diff: https://github.com/llvm/llvm-project/pull/141751.diff 1 Files Affected:
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();
|
for (const auto &CU : DICtx.compile_units()) { | ||
CU->clear(); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if there is some state that wasn't cleared in the DWARFUnit objects (or DWARFCompileUnit objects) then we should be doing one of two things:
- Instead of calling
void DWARFUnit::clearDIEs(bool KeepCUDie, bool KeepDWODies = false);
, we callDWARFUnit::clear()
. This should reset all of the state correctly and avoid the assertion - in
void clearDIEs(bool KeepCUDie, bool KeepDWODies = false);
we should clear any state related to the DIEs that needs to be cleared.
1126c00
to
ee2c633
Compare
ee2c633
to
24a0434
Compare
@peremyach want me to merge this for you? |
@Jlalond yes, please |
Verification crashed here https://github.com/llvm/llvm-project/blob/main/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp#L519 The reason being that during verification 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. Co-authored-by: Arslan Khabutdinov <akhabutdinov@fb.com>
Verification crashed here https://github.com/llvm/llvm-project/blob/main/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp#L519 The reason being that during verification 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. Co-authored-by: Arslan Khabutdinov <akhabutdinov@fb.com>
This reverts commit beb6972.
This reverts commit beb6972.
Verification crashed here https://github.com/llvm/llvm-project/blob/main/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp#L519
The reason being that during verification 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.