[Soot-list] Is this a soot bug?

John Jorgensen jorgnsn at lcd.uregina.ca
Fri Jun 24 23:56:25 EDT 2005


    Luca> I encountered problems in building soot Call graph on bytecode produced
    Luca> by the aspectJ 2.1 compiller.
    Luca> This bytecode is perfectly executed by sun JVM 1.5, but when I try to
    Luca> build a call graph using Soot CallGraphBuilder.build() I get the
    Luca> following errors (i enabled the verbose opton in order to provide more
    Luca> information) :

    .
    .
    .

    Luca> [<clinit>] Constructing JimpleBody from coffi...
    Luca> [<clinit>]     Parsing Coffi instructions...
    Luca> [<clinit>]     Building Coffi CFG...
    Luca> [<clinit>]     Producing naive Jimple...
    Luca> Applying phase jb.ls to <TInvariant: void <clinit>()>.
    Luca> [<clinit>] Splitting locals...
    Luca> [<clinit>]     Constructing soot.toolkits.graph.ExceptionalUnitGraph...
    Luca> Exception in thread "main" java.lang.NullPointerException
    Luca> 	at soot.AnySubType.v(AnySubType.java:44)
    Luca> 	at
    Luca> soot.toolkits.exceptions.ThrowableSet$Manager.<init>(ThrowableSet.java:
    Luca> 239)

    .
    .
    .

    Luca> Can anyone tell me something more about this problem?
    Luca> I can also send analyzed bytecode, if anyone is interested (I don't
    Luca> posto it with this mail in order to don't flood the mailing list

Please mail me the analyzed bytecode. I would like to see if I
can duplicate the problem.

In the meantime, I have two observations:

1. You mention that the bytecode executes under JVM 1.5.  Was it
   compiled using 1.5 specific features?  The latest released
   version of Soot (2.2.1) does not support 1.5 (the feature that I
   know to cause problems is 1.5's treatment of class constants, but
   there are probably other problems I know nothing about).  Some
   changes designed to support Java 1.5 have been checked into the
   Soot's repository since the last release. I am unfamiliar with
   the changes, and do not know if they are complete, but if you
   need 1.5 features, you need to build soot from source checked out
   of the repository.

2. Your stack trace suggests the possibility that the
   ThrowableSet manager used
   AnySubType.v("java.lang.ClassFormatError") before that class
   was loaded.  The hole in that explanation, though, is
   that your verbose output suggests that several
   ExceptionalUnitGraphs had already been built, and building
   them should already have required references to
   AnysubType.v("java.lang.ClassFormatError").  Are you calling
   soot.Main.main() to perform your analysis, or are you using
   Soot as a library?  If the latter, then maybe your code is
   somehow failing to perform the equivalent of
   Scene.addBasicClass("java.lang.ClassFormatError").

-- 
John Jorgensen	LCD System Administrator  jorgnsn at lcd.uregina.ca
                                          306.337.2344



More information about the Soot-list mailing list