HLIL incorrectly resolving union fields in some cases
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- cpp
- Ambito
- compilers, reverse-engineering
Direzione di ricerca
Load the attached bin.zip in Binary Ninja, go to 0x077d050, and apply the provided union type to the second argument. Compare the HLIL output with MLIL for the union fields token->_long.size.b and token->_long.data. Done means HLIL resolves these fields correctly instead of emitting token->_long.b and __offset(0x10).q.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Version and Platform (required):
- Binary Ninja Version: 5.2.8284-dev Personal (47c97600)
- Edition: Non-Commercial
- OS: MacOS
- OS Version: 15.5
- CPU Architecture: M1
Bug Description:
HLIL can't resolve union fields properly. Here is an example with 2 things:
1 - you can see that in if condition HLIL failed to resolve token->_long.size.b and generated token->_long.b instead;
2 - in true-branch instead of token->_long.data for some reason there is token->_long.__offset(0x10).q.
In MLIL however fields resolved correctly, buggy behaviour only in HLIL.
In attached screenshots you can see how it looks like in HLIL (first screenshot) and MLIL (second screenshot):
And here is how it looks in HLIL, if i change the type of token from union to regular structure (string::_long), fields resolved correctly:
The type for the repro:
struct string::_long
{
uint64_t size;
uint64_t cap;
char* data;
};
union string
{
struct string::_long _long;
};
Steps To Reproduce:
Please provide all steps required to reproduce the behavior:
- Go to 0x077d050
- Apply provided union type to the second argument
Expected Behavior:
HLIL should resolve union fields correctly.
Binary:
https://github.com/user-attachments/files/22319368/bin.zip
- 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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Vector35/binaryninja-api
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
Vector35/binaryninja-api#8540 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
Vector35/binaryninja-api#8516 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
Vector35/binaryninja-api#8503 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
Vector35/binaryninja-api#8446 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
Vector35/binaryninja-api#8444 ·
Tutte le issue di Vector35/binaryninja-api
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
-
Sensor initialization takes very long when `--initial-sim-time` is set to current UNIX timestamp Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
gazebosim/gz-sensors#662 · 1 commento ·
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
comp-datalake
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
ClickHouse/ClickHouse#121222 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
LadybirdBrowser/ladybird#12123 ·