From 531f24581796a22735233559d22c99727b729c3f Mon Sep 17 00:00:00 2001 From: Mark Mossberg Date: Tue, 18 Apr 2017 14:00:13 -0400 Subject: [PATCH] Fix arm PUSH (#141) If sp is in the list, it gets pushed incorrectly because it gets updated by the stack_pushes for registers that occur before it --- manticore/core/cpu/arm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manticore/core/cpu/arm.py b/manticore/core/cpu/arm.py index 14ef72b..074a55f 100644 --- a/manticore/core/cpu/arm.py +++ b/manticore/core/cpu/arm.py @@ -626,9 +626,9 @@ class Armv7Cpu(Cpu): @instruction def PUSH(cpu, *regs): - high_to_low_regs = regs[::-1] + high_to_low_regs = [r.read() for r in regs[::-1]] for reg in high_to_low_regs: - cpu.stack_push(reg.read()) + cpu.stack_push(reg) @instruction