Vector35 / Vector35/binaryninja-api
Unsigned shift of signed value during optimized signed divide that is only valid because of additional multiplication fails to simplify
Personne n'a encore pris cette issue.
- Langage dominant
- C++
- Étoiles
- 1.3k
- Forks
- 298
- Merge moyen
- 5 j 5 h
- PR mergées (30 j)
- 19
Description
Sometimes the compiler can emit a pattern for optimized modulus where the optimized division component of the modulus
is not valid on its own. It can use an unsigned shift by a small amount during a signed division, which normally would
cause the result to be incorrect, but it can be correct if that result is later multiplied by a value, causing all
values to produce the correct result.
Because Binary Ninja first simplifies the optimized divide, then simplifies the modulus, it cannot simplify the
expression at all.
Binary with examples:
See 12, 24, 36, 48, and others.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Start with the unsigned_shift.zip examples, especially the cases involving 12, 24, 36, and 48, and trace how Binary Ninja simplifies the optimized divide and modulus. The issue is resolved when these patterns simplify correctly despite the intermediate signed-division result being invalid on its own.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- cpp
- Domaine
- compilers, reverse-engineering
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 32/100