[PATCH] D112337: [DebugInfo] Only create concrete DIEs of concrete functions
Ellis Hoag via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 11 16:44:36 PST 2021
ellis added inline comments.
================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp:1149-1153
+ // Try to reference the abstract origin if the subprogram is not concrete.
+ if (!DD->IsConcrete(SP))
+ if (auto *SPDie = DU->getAbstractSPDies().lookup(SP))
+ return SPDie;
+
----------------
I believe the bug is here. When using the `-generate-type-units` flag we cannot share DIEs accross CUs, but SPDie could come from a different CU.
The crash happened at `DwarfDebug.cpp:addDwarfTypeUnitType()` because a DIE was created, added to the child of a DIE in another unit, then destroyed in `addDwarfTypeUnitType()` while the parent DIE still existed.
I have a patch that I think works fine on the `abseil-cpp` project, so I'll upload that soon.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112337/new/
https://reviews.llvm.org/D112337
More information about the llvm-commits
mailing list