<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:"Book Antiqua";
panose-1:2 4 6 2 5 3 5 3 3 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle19
{mso-style-type:personal;
font-family:"Book Antiqua",serif;
color:windowtext;
font-weight:normal;
font-style:normal;
text-decoration:none none;}
span.EmailStyle20
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:#1F497D;}
span.EmailStyle21
{mso-style-type:personal-reply;
font-family:"Book Antiqua",serif;
color:#943634;
font-weight:normal;
font-style:normal;
text-decoration:none none;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-IE link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Book Antiqua",serif;color:#943634;mso-fareast-language:EN-US'>Thanks Paul,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Book Antiqua",serif;color:#943634;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Book Antiqua",serif;color:#943634;mso-fareast-language:EN-US'>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.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Book Antiqua",serif;color:#943634;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Book Antiqua",serif;color:#943634;mso-fareast-language:EN-US'>Have to roll my sleeves up and go hunting ;-)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Book Antiqua",serif;color:#943634;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Book Antiqua",serif;color:#943634;mso-fareast-language:EN-US'> MartinO<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Book Antiqua",serif;color:#943634;mso-fareast-language:EN-US'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US>From:</span></b><span lang=EN-US> Robinson, Paul [mailto:paul.robinson@sony.com] <br><b>Sent:</b> 25 September 2017 18:44<br><b>To:</b> Martin J. O'Riordan <MartinO@theheart.ie><br><b>Cc:</b> llvm-dev@lists.llvm.org<br><b>Subject:</b> RE: [llvm-dev] Assertion in 'DwarfDebug.cpp'<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Here are a couple things I would try to help triangulate on the problem.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>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.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>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.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Good luck,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>--paulr<o:p></o:p></span></p><p class=MsoNormal><a name="_MailEndCompose"></a><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma",sans-serif'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma",sans-serif'> llvm-dev [<a href="mailto:llvm-dev-bounces@lists.llvm.org">mailto:llvm-dev-bounces@lists.llvm.org</a>] <b>On Behalf Of </b>Martin J. O'Riordan via llvm-dev<br><b>Sent:</b> Monday, September 25, 2017 7:56 AM<br><b>To:</b> 'LLVM Developers'<br><b>Subject:</b> [llvm-dev] Assertion in 'DwarfDebug.cpp'<o:p></o:p></span></p></div></div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Book Antiqua",serif'>Since updating to the LLVM v5.0 Final tag, I am seeing a crash when I enable ‘</span><span style='font-size:12.0pt;font-family:"Courier New"'>-g</span><span style='font-size:12.0pt;font-family:"Book Antiqua",serif'>’. With a Debug build this hits an assertion at line #923 in ‘</span><span style='font-size:12.0pt;font-family:"Courier New"'>lib/CodeGen/AsmPrinter/DwarfDebug.cpp</span><span style='font-size:12.0pt;font-family:"Book Antiqua",serif'>’:<o:p></o:p></span></p><p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:12.0pt;font-family:"Courier New"'>assert(EndLabel && "Forgot label after instruction ending a range!");<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Book Antiqua",serif'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Book Antiqua",serif'>The values of related variables at this time are:<o:p></o:p></span></p><p style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:27.0pt;margin-bottom:.0001pt'><span style='font-family:"Courier New";color:black'>'Begin' is: DBG_VALUE %I23, %noreg, !"fp", <!345>; line no:381<o:p></o:p></span></p><p style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:27.0pt;margin-bottom:.0001pt'><span style='font-family:"Courier New";color:black'>'End' is: DBG_VALUE %I19, 88, !"ap", <!345>; line no:381 indirect<o:p></o:p></span></p><p style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:27.0pt;margin-bottom:.0001pt'><span style='font-family:"Courier New";color:black'>'StartLabel' is: .Ltmp327<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Book Antiqua",serif'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Book Antiqua",serif'>‘</span><span style='font-size:12.0pt;font-family:"Courier New"'>I19</span><span style='font-size:12.0pt;font-family:"Book Antiqua",serif'>’ is the stack-pointer, and it is the expression ‘</span><span style='font-size:12.0pt;font-family:"Courier New"'>EndLabel = getLabelAfterInsn(End)</span><span style='font-size:12.0pt;font-family:"Book Antiqua",serif'>’ that is returning ‘</span><span style='font-size:12.0pt;font-family:"Courier New"'>nullptr</span><span style='font-size:12.0pt;font-family:"Book Antiqua",serif'>’. This happens only when compiling ‘</span><span style='font-size:12.0pt;font-family:"Courier New"'>vfprintf.c</span><span style='font-size:12.0pt;font-family:"Book Antiqua",serif'>’ or ‘</span><span style='font-size:12.0pt;font-family:"Courier New"'>vfwprintf.c</span><span style='font-size:12.0pt;font-family:"Book Antiqua",serif'>’ from Newlib v2.5.0, and line #381 referenced is the location of the declaration of the function ‘</span><span style='font-size:12.0pt;font-family:"Courier New"'>_vfwprintf_r</span><span style='font-size:12.0pt;font-family:"Book Antiqua",serif'>’. 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.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Book Antiqua",serif'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Book Antiqua",serif'>Has this been seen before, and any suggestions on how I should debug this?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Book Antiqua",serif'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Book Antiqua",serif'>Thanks,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Book Antiqua",serif'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Book Antiqua",serif'> MartinO<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Book Antiqua",serif'><o:p> </o:p></span></p></div></div></body></html>