Properly sign extend delta in compact unwind info

llvm-svn: 207170
This commit is contained in:
Nick Kledzik 2014-04-25 01:39:06 +00:00
parent f00751bfa1
commit 0fef333dee
1 changed files with 3 additions and 2 deletions

View File

@ -879,8 +879,9 @@ bool UnwindCursor<A, R>::getInfoFromCompactEncodingSection(pint_t pc,
sectionHeader.personalityArrayCount());
return false;
}
uint32_t personalityDelta = _addressSpace.get32(
sects.compact_unwind_section + sectionHeader.personalityArraySectionOffset() +
int32_t personalityDelta = (int32_t)_addressSpace.get32(
sects.compact_unwind_section +
sectionHeader.personalityArraySectionOffset() +
personalityIndex * sizeof(uint32_t));
pint_t personalityPointer = sects.dso_base + (pint_t)personalityDelta;
personality = _addressSpace.getP(personalityPointer);