[PATCH] D43092: [DebugInfo] Prevent infinite recursion for malformed DWARF

Jonas Devlieghere via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 13 11:42:09 PST 2018


Is there anything in the DWARF standard that would suggest this shouldn’t be possible? If not I think we should support it as is and implement the more advanced loop detection?

> On Feb 9, 2018, at 3:53 PM, David Blaikie <dblaikie at gmail.com> wrote:
> 
> *nod* Thought so - would be good to know what scenario this is meant to support.
> 
> On Fri, Feb 9, 2018 at 2:22 AM Jonas Devlieghere via Phabricator <reviews at reviews.llvm.org <mailto:reviews at reviews.llvm.org>> wrote:
> JDevlieghere added a subscriber: clayborg.
> JDevlieghere added a comment.
> 
> In https://reviews.llvm.org/D43092#1002677 <https://reviews.llvm.org/D43092#1002677>, @dblaikie wrote:
> 
> > Could you check the revision history here? I'm pretty sure the first version of this I reviewed from Greg wasn't recursive - and then it became recursive at some point to handle something needed, but maybe those decisions need to be reexamined?
> 
> 
> It was @clayborg himself that updated the implementation. (https://reviews.llvm.org/D40156 <https://reviews.llvm.org/D40156> https://reviews.llvm.org/rL319104 <https://reviews.llvm.org/rL319104>)
> 
> > The previous implementation would only look 1 DW_AT_specification or DW_AT_abstract_origin deep. This means DWARFDie::getName() would fail in certain cases. I ran into such a case while creating a tool that used the LLVM DWARF parser to generate a symbolication format so I have seen this in the wild.
> 
> 
> https://reviews.llvm.org/D43092 <https://reviews.llvm.org/D43092>
> 
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180213/22e8dd3b/attachment.html>


More information about the llvm-commits mailing list