]> granicus.if.org Git - llvm/commit
[dsymutil] Check AttrInfo.Name validity before using it
authorKeno Fischer <keno@alumni.harvard.edu>
Thu, 26 Oct 2017 17:31:33 +0000 (17:31 +0000)
committerKeno Fischer <keno@alumni.harvard.edu>
Thu, 26 Oct 2017 17:31:33 +0000 (17:31 +0000)
commitea6f05e017653ff7851ffb1e263847cc9e6d7cec
treeef4cdd3708f435825202257652433035cb4f3c82
parentae8900a8833835309aecb0a3d947c2ae46fd86c3
[dsymutil] Check AttrInfo.Name validity before using it

Summary:
This upstreams a patch from the osxcross [1] toolchain.
It appears that llvm-dsymutil crashes at this place during GCC
bootstrap. Adding the check here seems reasonable, since it operates
on arbitrary input DWARF, not necessarily generated by the LLVM
toolchain, and it seems the un-mangled name need not necessarily exist.

Patch by Thomas Pöchtrager

[1] https://github.com/tpoechtrager/osxcross

Reviewed By: aprantl
Differential Revision: https://reviews.llvm.org/D39336

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316678 91177308-0d34-0410-b5e6-96231b3b80d8
tools/dsymutil/DwarfLinker.cpp