-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Extended pipeline crash] Non-deterministic error #206
Comments
/cib |
Branch issue-206-_Extended_pipeline_crash_Non-deterministic_error created! |
Seems to be |
The issue was actually in not checking if there is some change via alias or reference when propagating postponed aliased in expression propagation memory. Since the relations and relation like definitions are placed non-deterministically, sometimes this wrong propagation caused interference and led to crash and sometimes, if placement was lucky, just produced the incorrect decompiled code. The original source: int test12(){
// real - world example where we get dereference in plus operation fron Binja
int x;
x = 10;
int y;
int *ptr;
scanf("%d", &y);
x = y;
ptr = &y;
*ptr=7;
return &x + y;
} The decompilation in the issue description is wrong: extern void * data_3014 = "\x25\x64\x00";
void * test12() {
int var_2;
int var_3;
int * var_4;
__x86.get_pc_thunk.ax();
__isoc99_scanf(/* format */ data_3014, &var_2);
var_4 = &var_2;
*var_4 = 0x7;
var_3 = var_2;
return &var_3 + var_2 * 4;
} since Now we do it correctly: void * test12() {
int var_2;
int var_3;
int * var_4;
__x86.get_pc_thunk.ax();
__isoc99_scanf(/* format */ data_3014, &var_2);
var_3 = var_2;
var_4 = &var_2;
*var_4 = 0x7;
return &var_3 + var_2 * 4;
}
|
In case we want to address non-deterministic definitions insertion order: #224 |
What happened?
python decompile.py tests/samples/bin/extended/32/0/test_memory test12
sometimes crashes and sometimes produces decompiled output.How to reproduce?
s.o.
Affected Binary Ninja Version(s)
3.3.3996
The text was updated successfully, but these errors were encountered: