[llvm-dev] Assertion in 'DwarfDebug.cpp'
Robinson, Paul via llvm-dev
llvm-dev at lists.llvm.org
Mon Sep 25 10:44:09 PDT 2017
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 different.
Good luck,
--paulr
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 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp':
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 cause this.
Has this been seen before, and any suggestions on how I should debug this?
Thanks,
MartinO
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170925/4b67c820/attachment.html>
More information about the llvm-dev
mailing list