-
-
Notifications
You must be signed in to change notification settings - Fork 110
[Bug]: Fix BodyInterceptor: Dead Assignment Eliminator #1034
Description
What happened?
doesn't remove the dead assignments. For example: x = 10; is a dead assignment, as well as x = 20; since they are reassigned to new values or not used after that statement.
int tc6_1(int temp) { int x = 10; x = 30; temp = x; if (temp > 5) { x = someMethod(); } x = 20; return temp; }
current Output:
'this := @this: sootUp.RQ1.jb_dae.JB_DAE;
temp := @parameter0: int;
x = 10;
x = 30;
temp = x;
if temp <= 5 goto label1;
x = virtualinvoke this.<sootUp.RQ1.jb_dae.JB_DAE: int someMethod()>();
label1:
x = 20;
return temp;'
Expected Output:
`this := @this: sootUp.RQ1.jb_dae.JB_DAE;
temp := @parameter0: int;
x = 30;
temp = x;
if temp <= 5 goto label1;
x = virtualinvoke this.<sootUp.RQ1.jb_dae.JB_DAE: int someMethod()>();
label1:
return temp;`
Version
Latest develop branch
Relevant log output
No response