[Soot-list] Duplicating Locals!!

Steven Arzt Steven.Arzt at cased.de
Fri Feb 21 14:50:51 EST 2014


Hi,

 

for reproducing the issue, it would be great if you could also send us the
code you are using to create this output, i.e. the code you use to run Soot.
Only from the target application and the short description of your approach,
it's hard to tell what's going wrong here.

 

Best regards,

  Steven

 

From: soot-list-bounces at sable.mcgill.ca
[mailto:soot-list-bounces at sable.mcgill.ca] On Behalf Of M Alsob
Sent: Freitag, 21. Februar 2014 18:36
To: soot-list at sable.mcgill.ca
Subject: [Soot-list] Duplicating Locals!!

 

Hi all,

I am experiencing something odd with soot, and I am wondering whether is it
supposed to happen this way or is it a bug in the system,,

the code I am running is very simple, it just traverses a method unit graph,
it iterates over locals and for each local variable, it outputs the
following info:

given name, type, definition lines and use lines.. (just using getDefBoxs
and getUseBoxes)

for some variables the tool outputs two results with different types( e.g. w
and y ) and for some it duplicates them and outputs them as two different
vars( e.g. x)!!

 

why is that happening and is there a way to fix that??

Thanx..

 

this is a snapshot of the code in the java file:

 

38:   int w = 5, y,x,z;

39:   y=w-1;

40:   x = 3+y;

41:   z = x*y;

42:   if(y>0)

43:   {

44:       z=x++;

45:       if(someCondtionThatDoesNotIncludeTheVars))

46:       while(w>y)

47:       {

48:                   y += 10;

49:                   fun(y);

50:       }

51:       else

52:                   fun(y);

53:   }

54:   x = z*z;

55:   w = x;

56:   y = 0;

 

and this is some of the result:

 

-- Variable: w, Type: byte = { 

 Definition Lines: [[38, 38]]

 Use Lines: [[39, 39], [46]]

}

 

 -- Variable: y, Type: int = { 

 Definition Lines: [[39, 39], [48]]

 Use Lines: [[40, 40], [41, 41], [42], [48], [49], [46], [52]]

}

 

-- Variable: x, Type: int = { 

 Definition Lines: [[40, 40]]

 Use Lines: [[41, 41], [44], [44, 44]]

}

 

 -- Variable: z, Type: int = { 

 Definition Lines: [[41, 41], [44, 44]]

 Use Lines: [[54, 54], [54, 54], [58]]

 }

 

 -- Variable: x, Type: int = { 

 Definition Lines: [[44], [54, 54]]

 Use Lines: [[55, 55], [58], [58]]

}

 

 -- Variable: w, Type: int = { 

 Definition Lines: [[55, 55]]

 Use Lines: [[58]]

}

 

 -- Variable: y, Type: boolean = { 

 Definition Lines: [[56, 56]]

 Use Lines: []

}

 


Image removed by sender.


 





 <http://www.smileycentral.com/?partner=ZSzeb068_ZNxdm119YYSA> 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20140221/581beee2/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 407 bytes
Desc: not available
Url : http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20140221/581beee2/attachment-0001.jpe 


More information about the Soot-list mailing list