Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msp430: fix BR instruction behavior and register-indirect @Rn disassembly #65

Merged
merged 2 commits into from
May 6, 2024

Conversation

jovanbulck
Copy link
Contributor

Current behavior erroneously jumps to the address of the BR instruction, instead of the SRC operand. This leads to an infinite loop as per below.

========================
EXAMPLE CODE (objdump)
========================

  7282:       30 40 68 73     br      #0x7368

========================
ORIGINAL BEHAVIOR
========================

*** STEP 0
block of len 4 at ip 0x7282
---- BEGIN VEX ----
IRSB {

   00 | ------ IMark(0x7282, 4, 0) ------
   01 | PUT(pc) = 0x7368
   NEXT: PUT(pc) = 0x7282; Ijk_Boring
}
---- END VEX ----

*** STEP 1
block of len 4 at ip 0x7282
...

========================
NEW BEHAVIOR
========================

*** STEP 0
block of len 4 at ip 0x7282
---- BEGIN VEX ----
IRSB {

   00 | ------ IMark(0x7282, 4, 0) ------
   01 | PUT(pc) = 0x7368
   NEXT: PUT(pc) = 0x7368; Ijk_Boring
}
---- END VEX ----

==== STEP 1
block of len 48 at ip 0x7368
...

jovanbulck added 2 commits May 3, 2024 15:07
Current behavior erroneously jumps to the _address_ of the BR instruction,
instead of the SRC operand. This leads to an infinite loop.
Fixes:
"UnboundLocalError: local variable 'reg_str' referenced before assignment"
@twizmwazin twizmwazin merged commit f07fa48 into angr:master May 6, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants