HLIL incorrectly resolving union fields in some cases
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- cpp
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- C++
- スター
- 1.3k
- フォーク
- 298
- 平均マージ
- 5日 5時間
- マージ済み PR(30日)
- 19
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Vector35/binaryninja-api のほかの issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
Vector35/binaryninja-api#8540 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
Vector35/binaryninja-api#8516 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
Vector35/binaryninja-api#8503 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
Vector35/binaryninja-api#8446 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
Vector35/binaryninja-api#8444 ·
Vector35/binaryninja-api の issue をすべて見る
似ている issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 92/100
autowarefoundation/autoware_universe#13413 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
automated-analysis bug memory-safety
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
-
Sensor initialization takes very long when `--initial-sim-time` is set to current UNIX timestamp オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
gazebosim/gz-sensors#662 · コメント 1 件 ·