[llvm-dev] Assertion in 'DwarfDebug.cpp'
Martin J. O'Riordan via llvm-dev
llvm-dev at lists.llvm.org
Mon Sep 25 12:40:34 PDT 2017
Actually in my case (out of tree) I always compile to assembly. It does
appear to crash only when my target is selected, I build the compiler with
multiple targets enabled, and it does not crash for the other in-tree
targets even with the same compiler binary. Strange, I can't think of
anywhere in my target that handle debug information explicitly.
Have to roll my sleeves up and go hunting ;-)
From: Robinson, Paul [mailto:paul.robinson at sony.com]
Sent: 25 September 2017 18:44
To: Martin J. O'Riordan <MartinO at theheart.ie>
Cc: llvm-dev at lists.llvm.org
Subject: RE: [llvm-dev] Assertion in 'DwarfDebug.cpp'
Here are a couple things I would try to help triangulate on the problem.
Try a vanilla upstream compiler for an in-tree target. (IIRC you have your
own target.) If that fails, it's pretty optimal for you because you should
be able to reduce a test case and file a PR. If it doesn't fail, that
suggests it's either something your target does or doesn't do, or some bug
in how you've done your adaptation to LLVM 5.0.
You can also try compiling with -S and assembling the result; I have seen
that behave differently from direct object generation sometimes. If that's
the case here, it should be not terribly hard to work out how the paths are
From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of Martin
J. O'Riordan via llvm-dev
Sent: Monday, September 25, 2017 7:56 AM
To: 'LLVM Developers'
Subject: [llvm-dev] Assertion in 'DwarfDebug.cpp'
Since updating to the LLVM v5.0 Final tag, I am seeing a crash when I enable
'-g'. With a Debug build this hits an assertion at line #923 in
assert(EndLabel && "Forgot label after instruction ending a range!");
The values of related variables at this time are:
'Begin' is: DBG_VALUE %I23, %noreg, !"fp", <!345>; line no:381
'End' is: DBG_VALUE %I19, 88, !"ap", <!345>; line no:381 indirect
'StartLabel' is: .Ltmp327
'I19' is the stack-pointer, and it is the expression 'EndLabel =
getLabelAfterInsn(End)' that is returning 'nullptr'. This happens only when
compiling 'vfprintf.c' or 'vfwprintf.c' from Newlib v2.5.0, and line #381
referenced is the location of the declaration of the function
'_vfwprintf_r'. But our implementation does not directly do anything with
Dwarf meta-data, so I don't understand what we could be doing that would
Has this been seen before, and any suggestions on how I should debug this?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev