Skip to content

R5900 Platform does not gracefully handle float literals being assigned to float variables #7035

Open
@Souzooka

Description

@Souzooka

Version and Platform (required):

  • Binary Ninja Version: 5.1.7821-dev
  • Edition: Non-Commercial / Commercial / Ultimate
  • OS: Windows 10 Pro
  • OS Version: 10.0.19045 Build 19045
  • CPU Architecture: x86-64

Bug Description:
When a float literal (such as 0x3F800000) is assigned to a float variable, instead of emitting HLIL such as var = 1.0f, HLIL such as __builtin_memcpy(dest: &var, src: "\x00\x00\x80\x3F", count: 4) is emitted instead.

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

  1. Open an R5900 binary.
  2. Change the type of a variable to float (assuming the variable is actually a float).
  3. Observe the HLIL emitted by code assigning a value to that variable.

I've included a binary which demonstrates this issue (see @0x15be70)

Expected Behavior:
As per above, the HLIL should indicate that said float variable is being assigned that float constant.

Binary:
I've uploaded an archive to Portal with the key phrase: fierce forest sings calmly

This includes the original source binary and the bndb file.

Metadata

Metadata

Assignees

Labels

Arch: MIPSIssues with the MIPS architecture pluginComponent: ArchitectureIssue needs changes to an architecture pluginEffort: TrivialIssue should take < 1 dayImpact: LowIssue is a papercut or has a good, supported workaroundLiftingissues related to LLIL lifting

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions