Armv7: push of sp stores wrong value when lr is pushed

Open
#3,987 1 comment 0 reactions 1 assignee View on GitHub

@zznop is already working on this.

Since Jul 14, 2026.

Assessment

This issue has not been assessed yet.

Description

Arch: ARM/Thumb Component: Architecture Effort: Low Impact: Low Lifting

When sp is pushed on the stack together with lr (and likely also pc), this is converted in a sequences of individual pushes:

10011804 00602de9 push {sp, lr}

7 @ 10011804 push(lr)
8 @ 10011804 push(sp)

However, the pushing of lr modifies sp, while the value that should be pushed is the value of sp when it starts executing the push sequence. The original sp could be preserved in a temp register or (in this example) 4 should be added to sp.

Dominant language
C++
Stars
1.3k
Forks
298
Avg merge
5d 5h
Merged PRs (30d)
19

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Vector35/binaryninja-api

All issues in Vector35/binaryninja-api

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.