[Lldb-commits] [PATCH] D138176: [dsymutil] Fix assertion: (Ref > InputDIE.getOffset()), function cloneDieReferenceAttribute
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Nov 16 19:10:54 PST 2022
JDevlieghere updated this revision to Diff 475985.
JDevlieghere added a comment.
Remove unrelated changes
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138176/new/
https://reviews.llvm.org/D138176
Files:
llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h
llvm/lib/DWARFLinker/DWARFLinker.cpp
Index: llvm/lib/DWARFLinker/DWARFLinker.cpp
===================================================================
--- llvm/lib/DWARFLinker/DWARFLinker.cpp
+++ llvm/lib/DWARFLinker/DWARFLinker.cpp
@@ -934,9 +934,9 @@
}
if (!RefInfo.Clone) {
- assert(Ref > InputDIE.getOffset());
// We haven't cloned this DIE yet. Just create an empty one and
// store it. It'll get really cloned when we process it.
+ RefInfo.Reference = true;
RefInfo.Clone = DIE::get(DIEAlloc, dwarf::Tag(RefDie.getTag()));
}
NewRefDie = RefInfo.Clone;
@@ -949,7 +949,7 @@
// FIXME: we should be able to design DIEEntry reliance on
// DwarfDebug away.
uint64_t Attr;
- if (Ref < InputDIE.getOffset()) {
+ if (Ref < InputDIE.getOffset() && !RefInfo.Reference) {
// We must have already cloned that DIE.
uint32_t NewRefOffset =
RefUnit->getStartOffset() + NewRefDie->getOffset();
Index: llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h
===================================================================
--- llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h
+++ llvm/include/llvm/DWARFLinker/DWARFLinkerCompileUnit.h
@@ -77,6 +77,9 @@
/// Is ODR marking done?
bool ODRMarkingDone : 1;
+
+ /// Is DIE a forward or backward reference?
+ bool Reference : 1;
};
CompileUnit(DWARFUnit &OrigUnit, unsigned ID, bool CanUseODR,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138176.475985.patch
Type: text/x-patch
Size: 1402 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20221117/2e540559/attachment.bin>
More information about the lldb-commits
mailing list