[llvm] r302180 - Don't return an invalid line table if the DW_AT_stmt_list value is not in the .debug_line section.
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Mon May 8 11:52:49 PDT 2017
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?
& this could use a test case :)
On Mon, May 8, 2017 at 11:40 AM David Blaikie <dblaikie at gmail.com> wrote:
> Test case?
>
> On Thu, May 4, 2017 at 11:42 AM Greg Clayton via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
>> Author: gclayton
>> Date: Thu May 4 13:29:44 2017
>> New Revision: 302180
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=302180&view=rev
>> Log:
>> Don't return an invalid line table if the DW_AT_stmt_list value is not in
>> the .debug_line section.
>>
>>
>> Modified:
>> llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp
>>
>> Modified: llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp?rev=302180&r1=302179&r2=302180&view=diff
>>
>> ==============================================================================
>> --- llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp (original)
>> +++ llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp Thu May 4 13:29:44
>> 2017
>> @@ -692,6 +692,10 @@ DWARFContext::getLineTableForUnit(DWARFU
>> if (const DWARFLineTable *lt = Line->getLineTable(stmtOffset))
>> return lt;
>>
>> + // Make sure the offset is good before we try to parse.
>> + if (stmtOffset >= U->getLineSection().size())
>> + return nullptr;
>> +
>> // We have to parse it first.
>> DataExtractor lineData(U->getLineSection(), isLittleEndian(),
>> U->getAddressByteSize());
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170508/63340e34/attachment.html>
More information about the llvm-commits
mailing list