[DebugInfo] Prevent infinite recursion for malformed DWARF
authorJonas Devlieghere <jonas@devlieghere.com>
Mon, 30 Apr 2018 17:02:41 +0000 (17:02 +0000)
committerJonas Devlieghere <jonas@devlieghere.com>
Mon, 30 Apr 2018 17:02:41 +0000 (17:02 +0000)
commit4bbcb5ab044f252bf4e9b075de0c78c321e0eb81
tree8c1b4e02db47a7e042867e47fe29187f0b462392
parentbd3bf1660beb777f96dc92b92c6d38fdc875e476
[DebugInfo] Prevent infinite recursion for malformed DWARF

This prevents infinite recursion in DWARFDie::findRecursively for
malformed DWARF where a DIE references itself.

This fixes PR36257.

Differential revision: https://reviews.llvm.org/D43092

llvm-svn: 331200
llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
llvm/test/tools/llvm-dwarfdump/X86/invalid_abstract_origin.s [new file with mode: 0644]