[Soot-list] How can I avoid the java.lang.VerifyError?

Sunny sunfire001 at gmail.com
Mon May 8 21:29:41 EDT 2006


Michael,

Thanks for your advice! Now I have replaced Vector with ArrayList.

Yes, you are right. My code accessed a local variable before it was
initialized which was
illegal. You said to use something like: reportLocal(enclosingObj,
"unitialized"). But how
would I know a variable is unitialized or not when I get a local variable
from within the
BodyTransformer?

Furthermore, if I have the following Java code,

 Object x;
 x = "abc";
 x = "def";

and the translated Jimple code should look like this (before
instrumentation):

  java.lang.String r1, r2;
  r1 = "abc";
  r2 = "def";

Here a single local 'x' in the original code is splitted into two variables
r1 and r2 in Jimple.
How would I know both variables are actually generated from the same local
'x' in the original code? In other words, how would I know that the local
variable initially pointed to "abc", and then to "def", with these two
seemingly unrelated variables? I am confused. Could you please give me some
code snippet to show how to get the before/after values for the above 'x'?

Your help is greatly appreciated!

Sunny


On 5/8/06, mbatch at cs.mcgill.ca <mbatch at cs.mcgill.ca> wrote:
>
>
> First, as an aside, ArrayList is acceptable in place of a Vector since
> Soot is single-threaded. It is a good habit to use these non-synchronized
> lists to improve performance.
>
> Secondly, you are getting the verify error because you are trying to use
> the local varible before it is assigned a value (which is illegal in
> Java). If you want a print out of this, you could do something like
> reportLocal(enclosingObj, "unitialized") to explicitly state this.
>
> I'm unclear on a good solution to the two jimple local types.. hopefully
> someone else will chime in.
>
> Michael
>
>
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.CS.McGill.CA/pipermail/soot-list/attachments/20060508/9b344ec8/attachment.htm


More information about the Soot-list mailing list