[Soot-list] Is this a soot bug?

Luca mitch_ing at yahoo.it
Fri Jun 24 06:46:54 EDT 2005


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

Warning: using incomplete callgraph containing only application classes.
[<init>] Constructing JimpleBody from coffi...
[<init>]     Parsing Coffi instructions...
[<init>]     Building Coffi CFG...
[<init>]     Producing naive Jimple...
Applying phase jb.ls to <T: void <init>()>.
[<init>] Splitting locals...
[<init>]     Constructing soot.toolkits.graph.ExceptionalUnitGraph...
[<init>]     Constructing SimpleLiveLocals...
[<init>]     Constructing SmartLocalDefs...
[<init>]        done localToDefs map...
[<init>]        done unitToMask map...
[<init>]     SmartLocalDefs finished.
[<init>]     Constructing SimpleLocalUses...
[<init>]     finished SimpleLocalUses...
Applying phase jb.a to <T: void <init>()>.
[<init>] Aggregating iteration 1...
[<init>]     Constructing soot.toolkits.graph.ExceptionalUnitGraph...
[<init>]     Constructing SimpleLiveLocals...
[<init>]     Constructing SmartLocalDefs...
[<init>]        done localToDefs map...
[<init>]        done unitToMask map...
[<init>]     SmartLocalDefs finished.
[<init>]     Constructing SimpleLocalUses...
[<init>]     finished SimpleLocalUses...
[<init>] Aggregating iteration 2...
[<init>]     Constructing soot.toolkits.graph.ExceptionalUnitGraph...
[<init>]     Constructing SimpleLiveLocals...
[<init>]     Constructing SmartLocalDefs...
[<init>]        done localToDefs map...
[<init>]        done unitToMask map...
[<init>]     SmartLocalDefs finished.
[<init>]     Constructing SimpleLocalUses...
[<init>]     finished SimpleLocalUses...
Applying phase jb.ule to <T: void <init>()>.
[<init>] Eliminating unused locals...
Applying phase jb.tr to <T: void <init>()>.
[TypeAssigner] typing system started on Fri Jun 24 10:42:27 GMT 2005
[TypeAssigner] typing system ended. It took 0 mins and 0 secs.
Applying phase jb.ulp to <T: void <init>()>.
[<init>] Packing locals...
[<init>]     Constructing soot.toolkits.graph.ExceptionalUnitGraph...
[<init>]     Constructing SimpleLiveLocals...
Applying phase jb.lns to <T: void <init>()>.
Applying phase jb.cp to <T: void <init>()>.
[<init>] Propagating copies...
[<init>]     Constructing soot.toolkits.graph.ExceptionalUnitGraph...
[<init>]     Constructing SimpleLiveLocals...
[<init>]     Constructing SmartLocalDefs...
[<init>]        done localToDefs map...
[<init>]        done unitToMask map...
[<init>]     SmartLocalDefs finished.
[<init>]     Constructing SimpleLocalUses...
[<init>]     finished SimpleLocalUses...
[<init>]     Propagated: 0 fast copies  0 slow copies
Applying phase jb.dae to <T: void <init>()>.
[<init>] Eliminating dead code...
[<init>]     Constructing soot.toolkits.graph.ExceptionalUnitGraph...
[<init>]     Constructing SimpleLiveLocals...
[<init>]     Constructing SmartLocalDefs...
[<init>]        done localToDefs map...
[<init>]        done unitToMask map...
[<init>]     SmartLocalDefs finished.
[<init>]     Constructing SimpleLocalUses...
[<init>]     finished SimpleLocalUses...
Applying phase jb.cp-ule to <T: void <init>()>.
[<init>] Eliminating unused locals...
Applying phase jb.ne to <T: void <init>()>.
[<init>] Removing nops...
Applying phase jb.uce to <T: void <init>()>.
[<init>] Eliminating unreachable code...
[<init>]     Constructing soot.toolkits.graph.ExceptionalUnitGraph...
[<init>]     Removed 0 statements...
[set_temp] Constructing JimpleBody from coffi...
[set_temp]     Parsing Coffi instructions...
[set_temp]     Building Coffi CFG...
[set_temp]     Producing naive Jimple...
Applying phase jb.ls to <T: void set_temp(int)>.
[set_temp] Splitting locals...
[set_temp]     Constructing soot.toolkits.graph.ExceptionalUnitGraph...
[set_temp]     Constructing SimpleLiveLocals...
[set_temp]     Constructing SmartLocalDefs...
[set_temp]        done localToDefs map...
[set_temp]        done unitToMask map...
[set_temp]     SmartLocalDefs finished.
[set_temp]     Constructing SimpleLocalUses...
[set_temp]     finished SimpleLocalUses...
Applying phase jb.a to <T: void set_temp(int)>.
[set_temp] Aggregating iteration 1...
[set_temp]     Constructing soot.toolkits.graph.ExceptionalUnitGraph...
[set_temp]     Constructing SimpleLiveLocals...
[set_temp]     Constructing SmartLocalDefs...
[set_temp]        done localToDefs map...
[set_temp]        done unitToMask map...
[set_temp]     SmartLocalDefs finished.
[set_temp]     Constructing SimpleLocalUses...
[set_temp]     finished SimpleLocalUses...
[set_temp] Aggregating iteration 2...
[set_temp]     Constructing soot.toolkits.graph.ExceptionalUnitGraph...
[set_temp]     Constructing SimpleLiveLocals...
[set_temp]     Constructing SmartLocalDefs...
[set_temp]        done localToDefs map...
[set_temp]        done unitToMask map...
[set_temp]     SmartLocalDefs finished.
[set_temp]     Constructing SimpleLocalUses...
[set_temp]     finished SimpleLocalUses...
Applying phase jb.ule to <T: void set_temp(int)>.
[set_temp] Eliminating unused locals...
Applying phase jb.tr to <T: void set_temp(int)>.
[TypeAssigner] typing system started on Fri Jun 24 10:42:27 GMT 2005
[TypeAssigner] typing system ended. It took 0 mins and 0 secs.
Applying phase jb.ulp to <T: void set_temp(int)>.
[set_temp] Packing locals...
[set_temp]     Constructing soot.toolkits.graph.ExceptionalUnitGraph...
[set_temp]     Constructing SimpleLiveLocals...
Applying phase jb.lns to <T: void set_temp(int)>.
Applying phase jb.cp to <T: void set_temp(int)>.
[set_temp] Propagating copies...
[set_temp]     Constructing soot.toolkits.graph.ExceptionalUnitGraph...
[set_temp]     Constructing SimpleLiveLocals...
[set_temp]     Constructing SmartLocalDefs...
[set_temp]        done localToDefs map...
[set_temp]        done unitToMask map...
[set_temp]     SmartLocalDefs finished.
[set_temp]     Constructing SimpleLocalUses...
[set_temp]     finished SimpleLocalUses...
[set_temp]     Propagated: 0 fast copies  0 slow copies
Applying phase jb.dae to <T: void set_temp(int)>.
[set_temp] Eliminating dead code...
[set_temp]     Constructing soot.toolkits.graph.ExceptionalUnitGraph...
[set_temp]     Constructing SimpleLiveLocals...
[set_temp]     Constructing SmartLocalDefs...
[set_temp]        done localToDefs map...
[set_temp]        done unitToMask map...
[set_temp]     SmartLocalDefs finished.
[set_temp]     Constructing SimpleLocalUses...
[set_temp]     finished SimpleLocalUses...
Applying phase jb.cp-ule to <T: void set_temp(int)>.
[set_temp] Eliminating unused locals...
Applying phase jb.ne to <T: void set_temp(int)>.
[set_temp] Removing nops...
Applying phase jb.uce to <T: void set_temp(int)>.
[set_temp] Eliminating unreachable code...
[set_temp]     Constructing soot.toolkits.graph.ExceptionalUnitGraph...
[set_temp]     Removed 0 statements...
[shutdown] Constructing JimpleBody from coffi...
[shutdown]     Parsing Coffi instructions...
[shutdown]     Building Coffi CFG...
[shutdown]     Producing naive Jimple...
Applying phase jb.ls to <T: void shutdown()>.
[shutdown] Splitting locals...
[shutdown]     Constructing soot.toolkits.graph.ExceptionalUnitGraph...
[shutdown]     Constructing SimpleLiveLocals...
[shutdown]     Constructing SmartLocalDefs...
[shutdown]        done localToDefs map...
[shutdown]        done unitToMask map...
[shutdown]     SmartLocalDefs finished.
[shutdown]     Constructing SimpleLocalUses...
[shutdown]     finished SimpleLocalUses...
Applying phase jb.a to <T: void shutdown()>.
[shutdown] Aggregating iteration 1...
[shutdown]     Constructing soot.toolkits.graph.ExceptionalUnitGraph...
[shutdown]     Constructing SimpleLiveLocals...
[shutdown]     Constructing SmartLocalDefs...
[shutdown]        done localToDefs map...
[shutdown]        done unitToMask map...
[shutdown]     SmartLocalDefs finished.
[shutdown]     Constructing SimpleLocalUses...
[shutdown]     finished SimpleLocalUses...
[shutdown] Aggregating iteration 2...
[shutdown]     Constructing soot.toolkits.graph.ExceptionalUnitGraph...
[shutdown]     Constructing SimpleLiveLocals...
[shutdown]     Constructing SmartLocalDefs...
[shutdown]        done localToDefs map...
[shutdown]        done unitToMask map...
[shutdown]     SmartLocalDefs finished.
[shutdown]     Constructing SimpleLocalUses...
[shutdown]     finished SimpleLocalUses...
Applying phase jb.ule to <T: void shutdown()>.
[shutdown] Eliminating unused locals...
Applying phase jb.tr to <T: void shutdown()>.
[TypeAssigner] typing system started on Fri Jun 24 10:42:27 GMT 2005
[TypeAssigner] typing system ended. It took 0 mins and 0 secs.
Applying phase jb.ulp to <T: void shutdown()>.
[shutdown] Packing locals...
[shutdown]     Constructing soot.toolkits.graph.ExceptionalUnitGraph...
[shutdown]     Constructing SimpleLiveLocals...
Applying phase jb.lns to <T: void shutdown()>.
Applying phase jb.cp to <T: void shutdown()>.
[shutdown] Propagating copies...
[shutdown]     Constructing soot.toolkits.graph.ExceptionalUnitGraph...
[shutdown]     Constructing SimpleLiveLocals...
[shutdown]     Constructing SmartLocalDefs...
[shutdown]        done localToDefs map...
[shutdown]        done unitToMask map...
[shutdown]     SmartLocalDefs finished.
[shutdown]     Constructing SimpleLocalUses...
[shutdown]     finished SimpleLocalUses...
[shutdown]     Propagated: 0 fast copies  0 slow copies
Applying phase jb.dae to <T: void shutdown()>.
[shutdown] Eliminating dead code...
[shutdown]     Constructing soot.toolkits.graph.ExceptionalUnitGraph...
[shutdown]     Constructing SimpleLiveLocals...
[shutdown]     Constructing SmartLocalDefs...
[shutdown]        done localToDefs map...
[shutdown]        done unitToMask map...
[shutdown]     SmartLocalDefs finished.
[shutdown]     Constructing SimpleLocalUses...
[shutdown]     finished SimpleLocalUses...
Applying phase jb.cp-ule to <T: void shutdown()>.
[shutdown] Eliminating unused locals...
Applying phase jb.ne to <T: void shutdown()>.
[shutdown] Removing nops...
Applying phase jb.uce to <T: void shutdown()>.
[shutdown] Eliminating unreachable code...
[shutdown]     Constructing soot.toolkits.graph.ExceptionalUnitGraph...
[shutdown]     Removed 0 statements...
[get_lock] Constructing JimpleBody from coffi...
[get_lock]     Parsing Coffi instructions...
[get_lock]     Building Coffi CFG...
[get_lock]     Producing naive Jimple...
Applying phase jb.ls to <T: void get_lock()>.
[get_lock] Splitting locals...
[get_lock]     Constructing soot.toolkits.graph.ExceptionalUnitGraph...
[get_lock]     Constructing SimpleLiveLocals...
[get_lock]     Constructing SmartLocalDefs...
[get_lock]        done localToDefs map...
[get_lock]        done unitToMask map...
[get_lock]     SmartLocalDefs finished.
[get_lock]     Constructing SimpleLocalUses...
[get_lock]     finished SimpleLocalUses...
Applying phase jb.a to <T: void get_lock()>.
[get_lock] Aggregating iteration 1...
[get_lock]     Constructing soot.toolkits.graph.ExceptionalUnitGraph...
[get_lock]     Constructing SimpleLiveLocals...
[get_lock]     Constructing SmartLocalDefs...
[get_lock]        done localToDefs map...
[get_lock]        done unitToMask map...
[get_lock]     SmartLocalDefs finished.
[get_lock]     Constructing SimpleLocalUses...
[get_lock]     finished SimpleLocalUses...
[get_lock] Aggregating iteration 2...
[get_lock]     Constructing soot.toolkits.graph.ExceptionalUnitGraph...
[get_lock]     Constructing SimpleLiveLocals...
[get_lock]     Constructing SmartLocalDefs...
[get_lock]        done localToDefs map...
[get_lock]        done unitToMask map...
[get_lock]     SmartLocalDefs finished.
[get_lock]     Constructing SimpleLocalUses...
[get_lock]     finished SimpleLocalUses...
Applying phase jb.ule to <T: void get_lock()>.
[get_lock] Eliminating unused locals...
Applying phase jb.tr to <T: void get_lock()>.
[TypeAssigner] typing system started on Fri Jun 24 10:42:28 GMT 2005
[TypeAssigner] typing system ended. It took 0 mins and 0 secs.
Applying phase jb.ulp to <T: void get_lock()>.
[get_lock] Packing locals...
[get_lock]     Constructing soot.toolkits.graph.ExceptionalUnitGraph...
[get_lock]     Constructing SimpleLiveLocals...
Applying phase jb.lns to <T: void get_lock()>.
Applying phase jb.cp to <T: void get_lock()>.
[get_lock] Propagating copies...
[get_lock]     Constructing soot.toolkits.graph.ExceptionalUnitGraph...
[get_lock]     Constructing SimpleLiveLocals...
[get_lock]     Constructing SmartLocalDefs...
[get_lock]        done localToDefs map...
[get_lock]        done unitToMask map...
[get_lock]     SmartLocalDefs finished.
[get_lock]     Constructing SimpleLocalUses...
[get_lock]     finished SimpleLocalUses...
[get_lock]     Propagated: 0 fast copies  0 slow copies
Applying phase jb.dae to <T: void get_lock()>.
[get_lock] Eliminating dead code...
[get_lock]     Constructing soot.toolkits.graph.ExceptionalUnitGraph...
[get_lock]     Constructing SimpleLiveLocals...
[get_lock]     Constructing SmartLocalDefs...
[get_lock]        done localToDefs map...
[get_lock]        done unitToMask map...
[get_lock]     SmartLocalDefs finished.
[get_lock]     Constructing SimpleLocalUses...
[get_lock]     finished SimpleLocalUses...
Applying phase jb.cp-ule to <T: void get_lock()>.
[get_lock] Eliminating unused locals...
Applying phase jb.ne to <T: void get_lock()>.
[get_lock] Removing nops...
Applying phase jb.uce to <T: void get_lock()>.
[get_lock] Eliminating unreachable code...
[get_lock]     Constructing soot.toolkits.graph.ExceptionalUnitGraph...
[get_lock]     Removed 0 statements...
[release_lock] Constructing JimpleBody from coffi...
[release_lock]     Parsing Coffi instructions...
[release_lock]     Building Coffi CFG...
[release_lock]     Producing naive Jimple...
Applying phase jb.ls to <T: void release_lock()>.
[release_lock] Splitting locals...
[release_lock]     Constructing
soot.toolkits.graph.ExceptionalUnitGraph...
[release_lock]     Constructing SimpleLiveLocals...
[release_lock]     Constructing SmartLocalDefs...
[release_lock]        done localToDefs map...
[release_lock]        done unitToMask map...
[release_lock]     SmartLocalDefs finished.
[release_lock]     Constructing SimpleLocalUses...
[release_lock]     finished SimpleLocalUses...
Applying phase jb.a to <T: void release_lock()>.
[release_lock] Aggregating iteration 1...
[release_lock]     Constructing
soot.toolkits.graph.ExceptionalUnitGraph...
[release_lock]     Constructing SimpleLiveLocals...
[release_lock]     Constructing SmartLocalDefs...
[release_lock]        done localToDefs map...
[release_lock]        done unitToMask map...
[release_lock]     SmartLocalDefs finished.
[release_lock]     Constructing SimpleLocalUses...
[release_lock]     finished SimpleLocalUses...
[release_lock] Aggregating iteration 2...
[release_lock]     Constructing
soot.toolkits.graph.ExceptionalUnitGraph...
[release_lock]     Constructing SimpleLiveLocals...
[release_lock]     Constructing SmartLocalDefs...
[release_lock]        done localToDefs map...
[release_lock]        done unitToMask map...
[release_lock]     SmartLocalDefs finished.
[release_lock]     Constructing SimpleLocalUses...
[release_lock]     finished SimpleLocalUses...
Applying phase jb.ule to <T: void release_lock()>.
[release_lock] Eliminating unused locals...
Applying phase jb.tr to <T: void release_lock()>.
[TypeAssigner] typing system started on Fri Jun 24 10:42:28 GMT 2005
[TypeAssigner] typing system ended. It took 0 mins and 0 secs.
Applying phase jb.ulp to <T: void release_lock()>.
[release_lock] Packing locals...
[release_lock]     Constructing
soot.toolkits.graph.ExceptionalUnitGraph...
[release_lock]     Constructing SimpleLiveLocals...
Applying phase jb.lns to <T: void release_lock()>.
Applying phase jb.cp to <T: void release_lock()>.
[release_lock] Propagating copies...
[release_lock]     Constructing
soot.toolkits.graph.ExceptionalUnitGraph...
[release_lock]     Constructing SimpleLiveLocals...
[release_lock]     Constructing SmartLocalDefs...
[release_lock]        done localToDefs map...
[release_lock]        done unitToMask map...
[release_lock]     SmartLocalDefs finished.
[release_lock]     Constructing SimpleLocalUses...
[release_lock]     finished SimpleLocalUses...
[release_lock]     Propagated: 0 fast copies  0 slow copies
Applying phase jb.dae to <T: void release_lock()>.
[release_lock] Eliminating dead code...
[release_lock]     Constructing
soot.toolkits.graph.ExceptionalUnitGraph...
[release_lock]     Constructing SimpleLiveLocals...
[release_lock]     Constructing SmartLocalDefs...
[release_lock]        done localToDefs map...
[release_lock]        done unitToMask map...
[release_lock]     SmartLocalDefs finished.
[release_lock]     Constructing SimpleLocalUses...
[release_lock]     finished SimpleLocalUses...
Applying phase jb.cp-ule to <T: void release_lock()>.
[release_lock] Eliminating unused locals...
Applying phase jb.ne to <T: void release_lock()>.
[release_lock] Removing nops...
Applying phase jb.uce to <T: void release_lock()>.
[release_lock] Eliminating unreachable code...
[release_lock]     Constructing
soot.toolkits.graph.ExceptionalUnitGraph...
[release_lock]     Removed 0 statements...
[<clinit>] Constructing JimpleBody from coffi...
[<clinit>]     Parsing Coffi instructions...
[<clinit>]     Building Coffi CFG...
[<clinit>]     Producing naive Jimple...
Applying phase jb.ls to <TInvariant: void <clinit>()>.
[<clinit>] Splitting locals...
[<clinit>]     Constructing soot.toolkits.graph.ExceptionalUnitGraph...
Exception in thread "main" java.lang.NullPointerException
	at soot.AnySubType.v(AnySubType.java:44)
	at
soot.toolkits.exceptions.ThrowableSet$Manager.<init>(ThrowableSet.java:
239)
	at
soot.Singletons.soot_toolkits_exceptions_ThrowableSet_Manager(Singleton
s.java:1005)
	at
soot.toolkits.exceptions.ThrowableSet$Manager.v(ThrowableSet.java:274)
	at
soot.toolkits.exceptions.PedanticThrowAnalysis.mightThrow(PedanticThrow
Analysis.java:68)
	at
soot.toolkits.graph.ExceptionalUnitGraph.buildExceptionDests(Exceptiona
lUnitGraph.java:342)
	at
soot.toolkits.graph.ExceptionalUnitGraph.initialize(ExceptionalUnitGrap
h.java:262)
	at
soot.toolkits.graph.ExceptionalUnitGraph.<init>(ExceptionalUnitGraph.ja
va:148)
	at
soot.toolkits.graph.ExceptionalUnitGraph.<init>(ExceptionalUnitGraph.ja
va:180)
	at
soot.toolkits.scalar.LocalSplitter.internalTransform(LocalSplitter.java
:78)
	at soot.BodyTransformer.transform(BodyTransformer.java:51)
	at soot.Transform.apply(Transform.java:104)
	at soot.JimpleBodyPack.applyPhaseOptions(JimpleBodyPack.java:61)
	at soot.JimpleBodyPack.internalApply(JimpleBodyPack.java:93)
	at soot.Pack.apply(Pack.java:120)
	at soot.coffi.CoffiMethodSource.getBody(CoffiMethodSource.java:115)
	at soot.SootMethod.getBodyFromMethodSource(SootMethod.java:80)
	at soot.SootMethod.retrieveActiveBody(SootMethod.java:304)
	at
soot.jimple.toolkits.callgraph.OnFlyCallGraphBuilder.processNewMethod(O
nFlyCallGraphBuilder.java:182)
	at
soot.jimple.toolkits.callgraph.OnFlyCallGraphBuilder.processReachables(
OnFlyCallGraphBuilder.java:81)
	at
soot.jimple.toolkits.callgraph.CallGraphBuilder.build(CallGraphBuilder.
java:94)
	at graphs.CallGAnalysis.build(CallGAnalysis.java:115)
	at graphs.CallGAnalysis.getMethodList(CallGAnalysis.java:143)
	at CallGraphStub.main(CallGraphStub.java:115)


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


More information about the Soot-list mailing list