Sound variable merge in HLIL results in incorrect decompilation

Aperta
#8,440 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
cpp

Direzione di ricerca

Reproduce the issue in Binary Ninja's HLIL using the provided “phoenix index traces logarithmically” binary. Compare merging i_1 into i with the reverse order, then inspect the resulting initialization around both for loops. Done means the merged result preserves initialization to zero regardless of merge order, or the behavior is documented with an appropriate warning.

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

Descrizione

Component: Core Core: HLIL Core: MLIL Impact: Low

Version and Platform:

  • Binary Ninja Version: 6.0.10501-dev
  • Edition: Ultimate
  • OS: OSX
  • OS Version: 26.5.2
  • CPU Architecture: M3

Bug Description:
Merging two variables used as i in consecutive for loops results in semantically incorrect code when merging in the wrong order. When merging the second variable into the first, it loses that variable's first initialization. There might be another bug here that the initialization is not inside the for loop's initialization slot. Merging the second variable into the first seems to work how I expect it to.

Steps To Reproduce:

  1. Merge i_1 in the second for loop with i from the first
  2. See error

Expected Behavior:
I expect to see the initialization of i to zero before/inside the first for loop regardless of variable merge order (or for this behavior to be documented plus a warning when merging in the incorrect order, and probably not labeling them as sound merges).

Screenshots/Video Recording:
i merged with i_1, correctly clears value to zero before each loop
Image

i_1 merged with i, doesn't initialize i to zero
Image

Binary:
phoenix index traces logarithmically

Lingua principale
C++
Stelle
1.3k
Fork
298
Merge medio
5g 5h
PR unite (30g)
19

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.

Altre issue di Vector35/binaryninja-api

Tutte le issue di Vector35/binaryninja-api

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.