x86 lifting issues
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- cpp
調査の方向性
Start by reading core/flagsresolver.cpp around line 1855 and arch/x86/il.cpp around line 5263, then inspect the supplied kat-i386.o instructions at 0x10fa4 and 0x1236b. Verify that optimized LLIL branches on the original ECX value and that bsr exposes its scan result and zero flag semantics. Done means both cases produce the expected LLIL behavior.
索引モデルが issue の本文から書いたものです。
説明
Binary files and instruction addresses (ZIP available for upload separately):
kat-i386.o: 0x10fa4, 0x1236b; SHA-256e5c0a966aa75166edbb37d3130274e543b4dbf3a90718c197cc25f5d90965f8b
1: add ecx, -1; jae has an inverted condition
Binary instruction: kat-i386.o / signed_division at 0x10fa4; bytes 83c1ff 732b.
Disassembly: add ecx, 0xffffffff; jae 0x10fd4.
Current lifted LLIL (relevant lines):
ecx = add.d{*}(ecx, -1)
if (ge {u>=, x87comi.f>=, vcomi.f>=}) then 0x10fd4 else 0x10fa9
Current optimized LLIL (relevant lines):
temp0.d = ecx
ecx = ecx - 1
if (temp0.d u>= 1) then 0x10fd4 else 0x10fa9
Expected LLIL (semantic sketch):
old_ecx = ecx
ecx = add.d{*}(old_ecx, -1)
if (old_ecx == 0) then 0x10fd4 else 0x10fa9
Adding 0xffffffff sets the carry flag when the original ecx is nonzero. Since jae branches when carry is clear, it should branch only when the original ecx is zero; the optimized old_ecx u>= 1 condition branches in the opposite case. The lifted LLIL retains the flags correctly; the incorrect condition appears in optimized LLIL from the core flag resolver.
Code: core/flagsresolver.cpp:1855
2: x86 bsr / bsf
Binary instruction: kat-i386.o / bitcount_probe at 0x1236b; bytes 0fbdcf.
Disassembly: bsr ecx, edi.
Current lifted LLIL (relevant lines):
ecx, eflags = _bit_scan_reverse(edi)
Expected LLIL (semantic sketch):
ecx = 31 - clz.d(edi) for nonzero edi; ZF = (edi == 0)
The opaque form has no executable scan or ZF semantics in LLIL.
Code: arch/x86/il.cpp:5263
- 主要言語
- C++
- スター
- 1.3k
- フォーク
- 304
- 平均マージ
- 2日 20時間
- マージ済み PR(30日)
- 10
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Vector35/binaryninja-api のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
Vector35/binaryninja-api#8715 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Vector35/binaryninja-api#8714 ·
メンテナーはふだん 2 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
Vector35/binaryninja-api#8713 ·
メンテナーはふだん 2 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
Vector35/binaryninja-api#8689 ·
メンテナーはふだん 2 日以内に返信
-
Component: Python API
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
Vector35/binaryninja-api#8649 ·
メンテナーはふだん 2 日以内に返信
Vector35/binaryninja-api の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
ESPresense/ESPresense#2680 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1時間未満 初心者へのやさしさ 75/100
stew675/llama-cpp-rdna-boosts#348 ·
メンテナーはふだん 1 日以内に返信
-
Documentation: Add comprehensive newcomer onboarding guide, project structure, and local usage to README対応中かも @Ash-Blanc が今日担当しました。 オープンarea/other status/bot-triaged status/need-triage
難易度 2/5 半日 初心者へのやさしさ 85/100
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信