[PATCH] D93441: [DebugInfo] Fix crash with -fdebug-info-for-profiling and split dwarf

Jordan Rupprecht via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 17 11:54:05 PST 2020


rupprecht added a comment.

In D93441#2459646 <https://reviews.llvm.org/D93441#2459646>, @dblaikie wrote:

> Any idea if this was a recent regression or the like? Worth noting what patch might've caused it, etc.

We started noticing this with switching to dwarf5, which crashes in release builds too, and I ran into the assertion when trying to figure out the root cause with a debug build.

I checked as far back as d157a9bc8ba1 (Oct 28), and the crash is present there. I'd guess this has been present for a long time.



================
Comment at: llvm/test/DebugInfo/X86/debug-info-for-profiling-crash.ll:1
+; RUN: llc %s -split-dwarf-file=%t.dwo -filetype=obj -o /dev/null
+
----------------
dblaikie wrote:
> Generally tests should verify more than "does anything other than crash" - that's a fairly broad test/definition of acceptable behavior. So some checking that the resulting DWARF is as desired - especially around the specific codepath that crashed (what construct was meant to be created but never got created because of the assertion, for instance - or, with a non-assertions build did it produce some specific mangled DWARF that we can check is now correct)
Sure, I switched to a release build and let it run, with the expected dwarfdump skeleton listed here.

In short, the .debug_info contents now looks more similar to the .debug_info.dwo contents, namely with the `DW_TAG_subprogram` for `_ZN1b1dIiEEvT_` (i.e. `void b::d<int>(int)`) now present in .debug_info too. The previous version doesn't look mangled AFAICT, it's just missing sections.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93441/new/

https://reviews.llvm.org/D93441



More information about the llvm-commits mailing list