<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 14 (filtered medium)">
<style><!--
/* Font Definitions */
@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:0in;
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:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
span.EmailStyle18
{mso-style-type:personal;
font-family:"Book Antiqua","serif";
color:windowtext;
font-weight:normal;
font-style:normal;
text-decoration:none none;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:799879671;
mso-list-type:hybrid;
mso-list-template-ids:-808145964 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
{mso-level-text:"%1\)";
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level2
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level3
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l0:level4
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level5
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level6
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l0:level7
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level8
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level9
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></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-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span 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 style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span 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 style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span 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 style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Good luck,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">--paulr<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="color:#1F497D"><o:p> </o:p></span></a></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> llvm-dev [mailto:llvm-dev-bounces@lists.llvm.org]
<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"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-IE" 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 lang="EN-IE" style="font-size:12.0pt;font-family:"Courier New"">-g</span><span lang="EN-IE" style="font-size:12.0pt;font-family:"Book Antiqua","serif"">’.
With a Debug build this hits an assertion at line #923 in ‘</span><span lang="EN-IE" style="font-size:12.0pt;font-family:"Courier New"">lib/CodeGen/AsmPrinter/DwarfDebug.cpp</span><span lang="EN-IE" style="font-size:12.0pt;font-family:"Book Antiqua","serif"">’:<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span lang="EN-IE" 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 lang="EN-IE" style="font-size:12.0pt;font-family:"Book Antiqua","serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-IE" 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:0in;margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span lang="EN-IE" 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:0in;margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span lang="EN-IE" 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:0in;margin-right:0in;margin-bottom:0in;margin-left:27.0pt;margin-bottom:.0001pt">
<span lang="EN-IE" style="font-family:"Courier New";color:black">'StartLabel' is: .Ltmp327<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-IE" style="font-size:12.0pt;font-family:"Book Antiqua","serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-IE" style="font-size:12.0pt;font-family:"Book Antiqua","serif"">‘</span><span lang="EN-IE" style="font-size:12.0pt;font-family:"Courier New"">I19</span><span lang="EN-IE" style="font-size:12.0pt;font-family:"Book Antiqua","serif"">’
is the stack-pointer, and it is the expression ‘</span><span lang="EN-IE" style="font-size:12.0pt;font-family:"Courier New"">EndLabel = getLabelAfterInsn(End)</span><span lang="EN-IE" style="font-size:12.0pt;font-family:"Book Antiqua","serif"">’ that is returning
‘</span><span lang="EN-IE" style="font-size:12.0pt;font-family:"Courier New"">nullptr</span><span lang="EN-IE" style="font-size:12.0pt;font-family:"Book Antiqua","serif"">’. This happens only when compiling ‘</span><span lang="EN-IE" style="font-size:12.0pt;font-family:"Courier New"">vfprintf.c</span><span lang="EN-IE" style="font-size:12.0pt;font-family:"Book Antiqua","serif"">’
or ‘</span><span lang="EN-IE" style="font-size:12.0pt;font-family:"Courier New"">vfwprintf.c</span><span lang="EN-IE" 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 lang="EN-IE" style="font-size:12.0pt;font-family:"Courier New"">_vfwprintf_r</span><span lang="EN-IE" 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 lang="EN-IE" style="font-size:12.0pt;font-family:"Book Antiqua","serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-IE" 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 lang="EN-IE" style="font-size:12.0pt;font-family:"Book Antiqua","serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-IE" style="font-size:12.0pt;font-family:"Book Antiqua","serif"">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-IE" style="font-size:12.0pt;font-family:"Book Antiqua","serif""><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-IE" style="font-size:12.0pt;font-family:"Book Antiqua","serif""> MartinO<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-IE" style="font-size:12.0pt;font-family:"Book Antiqua","serif""><o:p> </o:p></span></p>
</div>
</div>
</body>
</html>