Sound variable merge in HLIL results in incorrect decompilation

Abierto
#8,440 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
cpp

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
C++
Estrellas
1.3k
Forks
298
Merge medio
5 d 5 h
PR fusionados (30 d)
19

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Vector35/binaryninja-api

Todos los issues de Vector35/binaryninja-api

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.