xor reg1, reg1 is not always simplified to reg1 = 0
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- cpp
- Bereich
- compilers, reverse-engineering
Rechercherichtung
Start by opening the supplied xor_simple.bndb.zip and keygenme4.exe.bndb.zip databases, then inspect the LLIL, MLIL, and HLIL around address 0x416ed5. Compare the inconsistent xor self-assignment simplification with the simple case. Done means equivalent opaque-predicate branches are simplified consistently without changing program semantics.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
When we have some code like
xor edx, edx
jne 0x18
The LLIL simplifies the xor instruction to edx = 0, and the jne instruction is treated as opaque predicate and removed in higher level of ILs.
LLIL:
MLIL:
HLIL:
This works perfectly for the above example, however, I noticed that it does not work all of the time. See below for an example:
This is an opaque predicate as well and the left branch is fake. The code always executes the right branch.
LLIL:
MLIL:
HLIL:
While the semantics of the code is still correct and we can see it is still an opaque predicate, we should be able to simplify it automatically.
Database:
Offending binary:
Address: 0x416ed5
Simple case:
xor_simple.bndb.zip
- Vorherrschende Sprache
- C++
- Sterne
- 1.3k
- Forks
- 298
- Ø Merge
- 5 T. 5 Std.
- Gemergte PRs (30 T.)
- 19
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus Vector35/binaryninja-api
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
Vector35/binaryninja-api#8540 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
Vector35/binaryninja-api#8516 ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
Vector35/binaryninja-api#8503 ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
Vector35/binaryninja-api#8446 ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
Vector35/binaryninja-api#8444 ·
Alle Issues in Vector35/binaryninja-api
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
-
Sensor initialization takes very long when `--initial-sim-time` is set to current UNIX timestamp Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
gazebosim/gz-sensors#662 · 1 Kommentar ·
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
-
comp-datalake
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
ClickHouse/ClickHouse#121222 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
LadybirdBrowser/ladybird#12123 ·