[llvm-readelf] - Do not enter an infinite loop when printing histogram.
commite3e3e0222a9253972b21db3145865acc9843abaf
authorGeorge Rimar <grimar@accesssoftek.com>
Thu, 10 Oct 2019 13:26:26 +0000 (10 13:26 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Thu, 10 Oct 2019 13:26:26 +0000 (10 13:26 +0000)
treebf5b852087eb4b78b93ea6759140a7f6265807e8
parent431a2a5ff7a1815751e57d74783403aafed9e272
[llvm-readelf] - Do not enter an infinite loop when printing histogram.

This is similar to D68086.
We are entering an infinite loop when dumping a histogram for a specially crafted
.hash section with a loop in a chain.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374344 91177308-0d34-0410-b5e6-96231b3b80d8
test/tools/llvm-readobj/elf-hash-histogram.test
tools/llvm-readobj/ELFDumper.cpp