Skip to content

Incorrect thumb2 disassembly #8039

@SlidyBat

Description

@SlidyBat

Version and Platform (required):

  • Binary Ninja Version: 5.3.9301-dev Personal (0855e811)
  • Edition: Non-Commercial
  • OS: macOS
  • OS Version: Tahoe 26.3
  • CPU Architecture: M1

Bug Description:
There seems to be a case where in a thumb2 function, instructions are being disassembled as armv7 instead.
It isn't fully clear to me what the conditions are for this, it seems like it may happen after an it block?

In this image, the instruction at address 6 is being disassembled as stmlt, which is incorrect:
Image

Disassembling that instruction alone as thumb2 gives the correct result, which is a b instruction:
Image

For some reason the instruction is being disassembled as armv7 rather than thumb2, even though the function is being created as thumb2.

Steps To Reproduce:
Please provide all steps required to reproduce the behavior:

  1. Create new binary view
  2. Paste following instruction bytes: 04bf0020704705f0aeb8
  3. Make thumb2 function at address 0
  4. Observe incorrect disassembly at address 6 (stmlt instead of b)

Expected Behavior:
The instruction at address 6 should be disassembled as thumb2.
As an example, this is what the disassembly looks like in IDA.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions