<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Mon, May 8, 2017 at 12:07 PM Greg Clayton <<a href="mailto:clayborg@gmail.com">clayborg@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><blockquote type="cite"><div>On May 8, 2017, at 11:52 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:</div><br class="m_-2382477553363866850Apple-interchange-newline"><div><div dir="ltr">Hey Greg - could you have your email address updated in the SVN login info, so replies to your commits go to you, rather than bouncing?<br></div></div></blockquote><div><br></div></div></div><div style="word-wrap:break-word"><div>I don't know this file. Can you point me to it?</div></div></blockquote><div><br>I don't think you can do it yourself - probably have to email llvm-admin (if that's the right name for the list) and/or Chris Lattner - I think it gets setup along with your SVN access credentials, etc.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><br><blockquote type="cite"><div><div dir="ltr"><br>& this could use a test case :)<br></div></div></blockquote><div><br></div></div></div><div style="word-wrap:break-word"><div><div>It is caught by <span style="font-size:11px">DWARFVerifier::verifyDebugLineStmtOffsets() with:</span></div><div><span style="font-size:11px"><br></span></div><div><div style="margin:0px;font-size:11px;line-height:normal;color:rgb(0,132,0)"><span style="font-variant-ligatures:no-common-ligatures;color:#000000">      </span><span style="font-variant-ligatures:no-common-ligatures">// Make sure we don't get a valid line table back if the offset is wrong.</span></div><div style="margin:0px;font-size:11px;line-height:normal"><span style="font-variant-ligatures:no-common-ligatures">      assert(LineTable == </span><span style="font-variant-ligatures:no-common-ligatures;color:#ba2da2">nullptr</span><span style="font-variant-ligatures:no-common-ligatures">);</span></div><div><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div><span style="font-variant-ligatures:no-common-ligatures">Still add a test for it?</span></div></div></div></div></blockquote><div><br>Was it failing on buildbots? That's fine then - helpful to mention that in the commit message in the future.<br><br>(& wonder why it didn't fail for you locally before you committed? If it only fails on some buildbot configurations it might be worth looking at whether a more general/portable test can be added)<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><br><blockquote type="cite"><div><div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Mon, May 8, 2017 at 11:40 AM David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Test case?</div><br><div class="gmail_quote"><div dir="ltr">On Thu, May 4, 2017 at 11:42 AM Greg Clayton via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: gclayton<br>
Date: Thu May  4 13:29:44 2017<br>
New Revision: 302180<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=302180&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=302180&view=rev</a><br>
Log:<br>
Don't return an invalid line table if the DW_AT_stmt_list value is not in the .debug_line section.<br>
<br>
<br>
Modified:<br>
    llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp<br>
<br>
Modified: llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp?rev=302180&r1=302179&r2=302180&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp?rev=302180&r1=302179&r2=302180&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp (original)<br>
+++ llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp Thu May  4 13:29:44 2017<br>
@@ -692,6 +692,10 @@ DWARFContext::getLineTableForUnit(DWARFU<br>
   if (const DWARFLineTable *lt = Line->getLineTable(stmtOffset))<br>
     return lt;<br>
<br>
+  // Make sure the offset is good before we try to parse.<br>
+  if (stmtOffset >= U->getLineSection().size())<br>
+    return nullptr;<br>
+<br>
   // We have to parse it first.<br>
   DataExtractor lineData(U->getLineSection(), isLittleEndian(),<br>
                          U->getAddressByteSize());<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div></blockquote></div></div>
</div></blockquote></div><br></div></blockquote></div></div>