diff options
| author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-12-18 12:49:46 -0800 |
|---|---|---|
| committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-12-18 12:54:04 -0800 |
| commit | e194d890126007bc8e5acb655f007ef76002edb7 (patch) | |
| tree | 6dbb510ebb8ee81ccbc9a52456516a7cec7b3b2d /lldb/source/Plugins/Process/Utility | |
| parent | 19464613440894f5906a83ea1b52999d9fa08882 (diff) | |
| download | bcm5719-llvm-e194d890126007bc8e5acb655f007ef76002edb7.tar.gz bcm5719-llvm-e194d890126007bc8e5acb655f007ef76002edb7.zip | |
[lldb/MachO] "Fix" intentional out-of-bounds error (NFC)
Remove the hack that populates the cpsr register in the gpr struct by
writing past the end of the array. This was tripping up ASan.
Patch by: Reva Cuthbertson
Diffstat (limited to 'lldb/source/Plugins/Process/Utility')
| -rw-r--r-- | lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp index 94eebabfe2e..173e6690415 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp @@ -1140,10 +1140,11 @@ bool RegisterContextDarwin_arm::ReadRegister(const RegisterInfo *reg_info, case gpr_sp: case gpr_lr: case gpr_pc: - case gpr_cpsr: value.SetUInt32(gpr.r[reg - gpr_r0]); break; - + case gpr_cpsr: + value.SetUInt32(gpr.cpsr); + break; case fpu_s0: case fpu_s1: case fpu_s2: |

