[PATCH] D157746: [BOLT][DWARF] Fix handling of invalid DIE references
Amir Ayupov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 14 15:36:00 PDT 2023
Amir accepted this revision.
Amir added a comment.
This revision is now accepted and ready to land.
LGTM with minor nits. Tricky issue but thanks for handling it gracefully.
================
Comment at: bolt/lib/Core/DIEBuilder.cpp:114
+ // It's nice to know original offset from which this DIE was constructed.
+ // Also this handles the case where there is a DIE ref which points to
+ // invalid DIE. This prevents assert when IR is written out.
----------------
This needs to be the first sentence.
================
Comment at: bolt/lib/Core/DIEBuilder.cpp:481-482
+ errs() << "BOLT-WARNING: [internal-dwarf-error]: could not parse "
+ "referenced DIE "
+ "at offset: "
+ << Twine::utohexstr(RefOffset) << ".\n";
----------------
================
Comment at: bolt/test/X86/dwarf4-invalid-reference-die-offset-no-internal-dwarf-error.s:11
+
+# CHECKBOLT: Referenced DIEs not in .debug_info
+# CHECKBOLT-NEXT: 91
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157746/new/
https://reviews.llvm.org/D157746
More information about the llvm-commits
mailing list