forked from OSchip/llvm-project
[test] Fix TestDWARFDieRangeInfoIntersects
Fixes heap buffer overflow triggered in DWARF verifier, detected by ASAN. llvm-svn: 313280
This commit is contained in:
parent
defe371771
commit
d585a20394
|
@ -89,6 +89,8 @@ bool DWARFVerifier::DieRangeInfo::intersects(const DieRangeInfo &RHS) const {
|
|||
auto End = Ranges.end();
|
||||
auto Iter = findRange(RHS.Ranges.front());
|
||||
for (const auto &R : RHS.Ranges) {
|
||||
if(Iter == End)
|
||||
return false;
|
||||
if (R.HighPC <= Iter->LowPC)
|
||||
continue;
|
||||
while (Iter != End) {
|
||||
|
|
Loading…
Reference in New Issue