unwind: fix invalid memory access

Fix out-of-bounds array access when setting arm float registers.

Patch by Leandro Graciá Gil!

llvm-svn: 245665
This commit is contained in:
Saleem Abdulrasool 2015-08-21 03:21:31 +00:00
parent b9fa99649b
commit fddd0e66de
1 changed files with 1 additions and 1 deletions

View File

@ -1689,7 +1689,7 @@ inline void Registers_arm::setFloatRegister(int regNum, unw_fpreg_t value) {
_saved_vfp_d16_d31 = true;
saveVFPv3(_vfp_d16_d31);
}
_vfp_d16_d31[regNum - UNW_ARM_D0] = value;
_vfp_d16_d31[regNum - UNW_ARM_D16] = value;
} else if (regNum >= UNW_ARM_WR0 && regNum <= UNW_ARM_WR15) {
if (!_saved_iwmmx) {
_saved_iwmmx = true;