Finding constants in disassembly often doesn't find any

Ouverte
#8,695 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 2 jours

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
55/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
cpp

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
C++
Étoiles
1.3k
Forks
304
Merge moyen
2 j 20 h
PR mergées (30 j)
10

Préparer son environnement

Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de Vector35/binaryninja-api

Toutes les issues de Vector35/binaryninja-api

Issues similaires

Plus d'issues C++

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.