Finding constants in disassembly often doesn't find any

オープン
#8,695 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
cpp

調査の方向性

Start by tracing BinaryView::FindAllConstant and how it matches disassembly tokens against their values; compare that behavior with InstructionTextToken sizes for the listed architectures. The issue does not name source files or tests, so locate the implementation and relevant coverage before choosing a fix. Done means numeric constants visible in disassembly can be found for the reproduction architectures.

索引モデルが issue の本文から書いたものです。

説明

Effort: Low Impact: Medium

Version and Platform (required):

  • Binary Ninja Version: 6.1.11009-dev Ultimate, d194d34
  • OS: macOS 27.0.1
  • CPU Architecture: arm64

Bug Description:
BinaryView::FindAllConstant can only find constants whose tokens report have a non-zero size. Many architectures don't populate the size for immediates within GetInstructionText.

Steps To Reproduce:

  1. Open an aarch64, armv7, thumb2, or MIPS binary.
  2. Switch to disassembly.
  3. Use the Find dialog with "Constant (Disassembly)" mode to search for a numeric constant that is visible within a function body.

Expected Behavior:
The constant that is clearly visible in the disassembly will be found.

Additional Information:
I'm not clear if the bug here is that BinaryView::FindAllConstant requires a token to have a non-zero size in order to match its value, or if the bug is that architectures aren't populating the size field for these tokens.

I can't find any documentation that indicates it is required for architectures to populate it, and the shape of the InstructionTextToken API in C++ has no way to require it for specific token types. That makes me lean towards BinaryView::FindAllConstant being at fault.

主要言語
C++
スター
1.3k
フォーク
304
平均マージ
2日 20時間
マージ済み PR(30日)
10

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Vector35/binaryninja-api のほかの issue

Vector35/binaryninja-api の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。