[Soot-list] NullPointerException during the 'jb' phase when using then 'use-original-names' flag

Jennifer Lhotak jlhotak at cs.mcgill.ca
Thu Sep 29 12:53:50 EDT 2005


Hi,

This is a bug that I introduced when adding code to handle java 1.5
bytecode. I've added a check to ensure the local variable type table is
not null before using it which fixes this problem. It is checked into the
Soot repository in revision 2144.

Jennifer

On Thu, 29 Sep 2005, Guillaume Salagnac wrote:

>
>
> Hello,
>
>
> If I specify the 'use-original-names' option to the jimple body creation
> phase, I get an the following exception. Does anyone have the same
> problem, or an idea about how to fix this ? Thanks.
>
>
> salagnac at pelvas:~/prog/java/soot/bli
> 17:46:20 (66)$ cat HelloWorld.java
> public class HelloWorld
> {
>     public static void main(String [] args)
>     {
>         String s=new String("Hello, World !");
>         System.out.println(s);
>     }
> }
>
> salagnac at pelvas:~/prog/java/soot/bli
> 17:47:07 (67)$ javac -g HelloWorld.java
>
> salagnac at pelvas:~/prog/java/soot/bli
> 17:48:38 (68)$ java soot.Main HelloWorld -p jb use-original-names:true
> Soot started on Thu Sep 29 17:48:42 MEST 2005
> Exception in thread "main" java.lang.NullPointerException
>         at soot.coffi.Util.getLocalForIndex(Util.java:840)
>         at soot.coffi.CFG.generateJimple(CFG.java:3241)
>         at soot.coffi.CFG.jimplify(CFG.java:1464)
>         at soot.coffi.CFG.jimplify(CFG.java:1127)
>         at soot.coffi.CoffiMethodSource.getBody(CoffiMethodSource.java:98)
>         at soot.SootMethod.getBodyFromMethodSource(SootMethod.java:80)
>         at soot.SootMethod.retrieveActiveBody(SootMethod.java:304)
>         at soot.PackManager.retrieveAllBodies(PackManager.java:727)
>         at soot.PackManager.runPacks(PackManager.java:306)
>         at soot.Main.run(Main.java:179)
>         at soot.Main.main(Main.java:153)
>
>
>
> Or am I doing something wrong ?
>
>
> (my classpath is
> ~/soot/jar/polyglotclasses-1.3.2.jar
> ~/soot/jar/jasminclasses-2.2.2.jar
> ~/soot/jar/sootclasses-2.2.2.jar
> /usr/local/soft/jdk/1.4.2/jre/lib/rt.jar
> .
> )
>
>
>
> -G
>
> --
> Guillaume Salagnac
> PhD Student, Laboratoire Vérimag, Grenoble, France.
> Je sers la science et c'est ma joie.
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>



More information about the Soot-list mailing list