-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
bugSomething is brokenSomething is broken
Description
Description
Original source:
int main(int argc, char **argv) {
bool v1 = getbool();
bool v2 = getbool();
bool v3 = getbool();
if (v1) {
puts("A");
if (v2) {
puts("B");
}
}
if (v2 || v3) {
puts("C");
}
puts("done");
return 0;
}python -m angr -- test decompile --functions main --preset full
int main()
{
char v1; // bpl
char v2; // bl
char v3; // r12b
v1 = getbool();
v2 = getbool();
v3 = getbool();
if (v1)
{
puts("A");
if (!v2)
{
LABEL_401079:
if (!v3)
{
puts("done");
return 0;
}
}
else
{
puts("B");
}
}
else if (!v2)
{
goto LABEL_401079;
}
puts("C");
puts("done");
return 0;
}presets fast and basic are slightly different but still not good.
Steps to reproduce the bug
Environment
No response
Additional context
The compiler inserts a goto from after puts("B") to after the second v2 check. This is not being deoptimized correctly.
Metadata
Metadata
Assignees
Labels
bugSomething is brokenSomething is broken