Open 5c4lar opened 2 years ago
For the following code
#include <stdio.h> #include <stdlib.h> void foo() { for(int i = 0; i < 10; i++) { for (int j = 0; j < 10; j++) { printf("%d", i); } } } int main() { foo(); return 0; }
obtained following result:
For this one:
#include <stdio.h> #include <stdlib.h> void foo() { int ****a = malloc(10 * sizeof(int**)); for (int i = 0; i < 10; i++) { a[i] = malloc(10 * sizeof(int**)); for(int j = 0; j < 10; j++) { a[i][j] = malloc(sizeof(int*)); *a[i][j] = malloc(sizeof(int)); **a[i][j] = i; printf("%d", **a[i][j]); } } } int main() { foo(); return 0; }
lli can execute the output file, but the result is wrong also, the function signature of foo is wrong, it has no return value, but in the lifted ir, it returns i8*.
Thanks for the bug report. I've reproduced them with the current tip of the repo.
Will look at it.
Pushed fix for first test.
For the following code
obtained following result:
For this one:
lli can execute the output file, but the result is wrong also, the function signature of foo is wrong, it has no return value, but in the lifted ir, it returns i8*.