<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On May 8, 2017, at 11:52 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com" class="">dblaikie@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">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 class=""></div></div></blockquote><div><br class=""></div>I don't know this file. Can you point me to it?<br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><br class="">& this could use a test case :)<br class=""></div></div></blockquote><div><br class=""></div><div>It is caught by <span style="font-size: 11px;" class="">DWARFVerifier::verifyDebugLineStmtOffsets() with:</span></div><div><span style="font-size: 11px;" class=""><br class=""></span></div><div><div style="margin: 0px; font-size: 11px; line-height: normal; color: rgb(0, 132, 0);" class=""><span style="font-variant-ligatures: no-common-ligatures; color: #000000" class="">      </span><span style="font-variant-ligatures: no-common-ligatures" class="">// 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;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">      assert(LineTable == </span><span style="font-variant-ligatures: no-common-ligatures; color: #ba2da2" class="">nullptr</span><span style="font-variant-ligatures: no-common-ligatures" class="">);</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Still add a test for it?</span></div></div></div><div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div dir="ltr" class="">On Mon, May 8, 2017 at 11:40 AM David Blaikie <<a href="mailto:dblaikie@gmail.com" class="">dblaikie@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">Test case?</div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Thu, May 4, 2017 at 11:42 AM Greg Clayton via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank" class="">llvm-commits@lists.llvm.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: gclayton<br class="">
Date: Thu May  4 13:29:44 2017<br class="">
New Revision: 302180<br class="">
<br class="">
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=302180&view=rev" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-project?rev=302180&view=rev</a><br class="">
Log:<br class="">
Don't return an invalid line table if the DW_AT_stmt_list value is not in the .debug_line section.<br class="">
<br class="">
<br class="">
Modified:<br class="">
    llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp<br class="">
<br class="">
Modified: llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp<br class="">
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" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp?rev=302180&r1=302179&r2=302180&view=diff</a><br class="">
==============================================================================<br class="">
--- llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp (original)<br class="">
+++ llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp Thu May  4 13:29:44 2017<br class="">
@@ -692,6 +692,10 @@ DWARFContext::getLineTableForUnit(DWARFU<br class="">
   if (const DWARFLineTable *lt = Line->getLineTable(stmtOffset))<br class="">
     return lt;<br class="">
<br class="">
+  // Make sure the offset is good before we try to parse.<br class="">
+  if (stmtOffset >= U->getLineSection().size())<br class="">
+    return nullptr;<br class="">
+<br class="">
   // We have to parse it first.<br class="">
   DataExtractor lineData(U->getLineSection(), isLittleEndian(),<br class="">
                          U->getAddressByteSize());<br class="">
<br class="">
<br class="">
_______________________________________________<br class="">
llvm-commits mailing list<br class="">
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank" class="">llvm-commits@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br class="">
</blockquote></div></blockquote></div></div>
</div></blockquote></div><br class=""></body></html>