[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bugs in Soot




Hi,
     I just started using SOOT and came upon the following issues, with
jdk1.3 on linux i386


-Small issue:

If you specify the -W option before the --app option, it does not work:

ex: java -Djava.compiler=NONE soot.Main  -W --app <classfile>

compilation failed: Can only whole-program optimize in application mode!

Obviously order should not matter




-Big issue:

The following command does not work

java -Djava.compiler=NONE soot.Main -O -c <classfile>


I get

Soot started on Fri Oct 27 13:52:09 PDT 2000
Transforming BST... BST.jasmin:4: Warning - Syntax error.
.field protected "root"
                        ^
BST.jasmin:4: Error - Couldn't repair and continue parse.
.field protected "root"
                        ^
BST.jasmin: Found 2 errors

Soot finished on Fri Oct 27 13:52:57 PDT 2000
Soot has run for 0 min. 47 sec.



If I try the command

java -Djava.compiler=NONE soot.Main -O -J <classfile>

it works, but then if I try

java -Djava.compiler=NONE soot.Main -O --src-prec jimple <classfile>


I get the same error as before. So is there a problem with the jimple
parser?


It seems to work if I use it on a very simple class such as

public class Test{


   public static void main(String[] args){

    while(true)
      System.out.println("HI");

   }

}


Since I get

Soot started on Fri Oct 27 14:17:28 PDT 2000
Transforming Test... Generated: Test.class

Soot finished on Fri Oct 27 14:17:55 PDT 2000
Soot has run for 0 min. 26 sec.

If I add a field:

public class Test{

   public int value;

   public static void main(String[] args){

    while(true)
      System.out.println("HI");

   }

}

I get the same kind of error as before




So is it a field thing?

I have not looked at the source and won't right now.

Please tell me when you have a fix, I need to optimize a whole lot of
stuff and SOOT looks promising.

Now I switched to version 1.0.0

The following sequence is quite weird:
Another example:

public class Maine{

  static Object semaphore = new Object();

  public static void main(String[] args){


      //       int a = 6;
      //     if ( a < 7)
      //   throw new NullPointerException();

     System.out.println("HI THERE");

Obviously there is some dead code elimination going on

if the classpath first does not include the current dir, I get

Warning: Maine is a phantom class!
Transforming Maine... Generated: Maine.class

Then If I correct the classpath, I get

Transforming Maine... Generated: Maine.class

So it works

But if I don't make the mistake of the current dir, it does not
work!!!!!

WEIRD!

And then all I can generate are such crap as

class BST extends BST{}


I did not observed the same behaviour in version 1.2.0.



Regards,
--
Philippe Laporte