[Soot-list] Is this a soot bug?
Luca
mitch_ing at yahoo.it
Sat Jun 25 14:11:17 EDT 2005
On Fri, 24 Jun 2005 21:56:25 -0600
John Jorgensen <jorgnsn at lcd.uregina.ca> wrote:
>
> 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.
>
The bytecode was compiled using aspectJ 1.2 compiler.
So it doesn't have any specifice jvm 1.5 feature.
Anyway i tried to compile it again, using eclipse AJDC compiler 1.2.0,
under eclipse 3.1M6 platform, and to run it under jvm 1.4.
The bytecode runs, but soot can't build a call graph on it, it throws
the same exception I reported in my previous mail.
> 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").
>
I am using soot as a library.
Before trying to build call graph I load class and support for each
class I want to analyze.
I have to remark my code used to work using a previous version of Soot
as a library (Soot 2.1.0) and analyzing code produced from a previous
version af the aspecJ compiler (1.1.1).
Using Soot 2.2.1 i can't analyze bytecode produced by the aspectj
compiler 1.1.1 anymore, neither I can analyze bytecode produced by later
versions of aspectJ compiler.
Soot 2.1.0 fail analyzing bytecode from versions of the aspectJ compiler
later than 1.1.1.
I will attach sources of the files I try to analyze, class
files I built using eclipse AJDT 1.2.0 and class files built using
aspectJ compiler 1.1.1, if asked, and I wll send a private mail.
All files are contained in tgz archives.
Best regards
Luca Cavallaro
More information about the Soot-list
mailing list