Vector35 / Vector35/binaryninja-api

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

Aperta
#7,035 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Arch: MIPS Component: Architecture Effort: Trivial Impact: Low Lifting
Lingua principale
C++
Stelle
1.3k
Fork
298
Merge medio
5g 5h
PR unite (30g)
19

Descrizione

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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Open the supplied R5900 binary and inspect HLIL at @0x15be70 after changing the variable type to float. Use the Portal binary and bndb with the reported reproduction steps, and confirm that the assignment is represented as a float literal rather than the emitted __builtin_memcpy form.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
cpp
Ambito
compilers, reverse-engineering
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.