[Soot-list] soot-classpath troubles

Chris Pickett cpicke at cs.mcgill.ca
Mon Aug 14 20:01:51 EDT 2006


Hi Dan,

Dan Grossman wrote:
> 
> Thanks.
> 
> My next step is to see if I can succeed with a "fresh from the Internet" 
> build of Soot-and-friends (i.e., without any of my group's 
> modifications).  That will determine if "we did something wrong in our 
> hacking" versus "we are invoking/installing Soot wrong".  The former is 
> certainly possible.

I don't know how to help you.  You might want to try using an svn 
checkout instead of a tarball, and if you do end up finding a bug, 
reporting it against the trunk.

> Note the error message is a bit strange -- it does _not_ say the class 
> can't be found; it says that it is still in "DANGLING" stage when it 
> should be in "SIGNATURES" stage.  I don't know enough about Soot's 
> type-resolution to know what could cause this.  Nothing we have done 
> intentionally touches anything to do with type-resolution.

In case you want to know, there are some secret wiki pages...

https://svn.sable.mcgill.ca/wiki/index.php/ClassResolverFAQ
https://svn.sable.mcgill.ca/wiki/index.php/ClassResolver

Chris

> 
> --Dan
> 
> Eric Bodden wrote:
> 
>> Hi.
>>
>> I am not entirely sure but I think you are suffering from some wrong
>> classpath setup or version conflict. For me this just works fine:
>>
>> mucuna ~/test $ java -version
>> java version "1.5.0_08"
>> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03)
>> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_08-b03, mixed mode)
>>
>> mucuna ~/test $ java -Xmx512m -cp
>> /home/user/ebodde/workspaces/abc/abc/lib/abc-complete.jar:/home/user/ebo
>> dde/bin/sun-jdk1.5.0_08/jre/lib/jce.jar:. soot.Main -W -src-prec c C
>> Soot started on Mon Aug 14 16:29:38 EDT 2006
>> [Call Graph] For information on where the call graph may be incomplete,
>> use the verbose option to the cg phase.
>> Transforming C...
>> Writing to sootOutput/C.class
>> Soot finished on Mon Aug 14 16:30:57 EDT 2006
>> Soot has run for 1 min. 19 sec.
>>
>> Eric
>>
>> P.S. I tool I found quite helpful for debugging classpath issues is
>> JWhich:
>> http://www.javaworld.com/javaworld/javatips/jw-javatip105.html
>>
>>
>>> -----Original Message-----
>>> From: soot-list-bounces at sable.mcgill.ca [mailto:soot-list-
>>> bounces at sable.mcgill.ca] On Behalf Of Dan Grossman
>>> Sent: Monday, August 14, 2006 2:54 PM
>>> To: soot-list at sable.mcgill.ca
>>> Subject: [Soot-list] soot-classpath troubles
>>>
>>>
>>> I am trying to run this class through Soot with -W:
>>>    public class C extends Thread { }
>>>
>>> I have a standard Linux box with the HotSpot Client VM installed in
>>> /usr/java/jdk1.5.0_06.
>>>
>>> Here is my call to java (full shell-script below):
>>> java  -Xmx1024m -classpath $JAVACLASSPATH \
>>>      soot.Main -W \
>>>      -src-prec c -soot-classpath $SOOTCLASSPATH C \
>>>      -p cg enabled:true,jdkver:4,implicit-entry:false \
>>>      -p cg.cha enabled:true
>>>
>>> As expected, if I don't set -soot-classpath, Soot cannot find
>>> java.lang.Thread.  But even when I set it to include all 7 .jar files
>>> in /usr/java/jdk1.5.0_06/jre/lib (including rt.jar), I get an error
>>> like this (full stacktrace below):
>>>    Exception in thread "main" java.lang.RuntimeException: This
>>> operation
>>>    requires resolving level SIGNATURES but sun.misc.FloatingDecimal is
>>> at
>>>    resolving level DANGLING
>>>
>>> Replacing -W with -w leads to the same behavior.
>>>
>>> This stacktrace is with implicit-entry:false for the cg phase.  If it
>>> is true (allowing me to just delete the 2 -p lines above entirely), I
>>> get the same error but with the java.io.BufferedInputStream class.
>>>
>>> In general, what am I doing wrong for running -W?  Is there some "all-
>>> encompassing" .jar file I need?  Is this a bug in Soot?  Are others
>>> using a different VM where this doesn't arise?  Can anyone confirm
>>> success running Soot with -W on a class that extends Thread?
>>>
>>> Let me admit I have not tried running on a "clean download" (i.e., my
>>> code has some additions to Soot), but I didn't touch anything germane
>>> to class lookup.
>>>
>>> Help would be very much appreciated!  (I don't know where to start
>>> looking!)
>>>
>>> Full stack trace and shell-script follows.
>>>
>>> --Dan
>>>
>>> =======
>>> Soot started on Mon Aug 14 11:50:10 PDT 2006 [Call Graph] For
>>> information on where the call graph may be incomplete, use the verbose
>>> option to the cg phase.
>>> Exception in thread "main" java.lang.RuntimeException: This operation
>>> requires resolving level SIGNATURES but sun.misc.FloatingDecimal is at
>>> resolving level DANGLING
>>>          at soot.SootClass.checkLevel(SootClass.java:128)
>>>          at soot.SootClass.declaresField(SootClass.java:371)
>>>          at
>>> soot.AbstractSootFieldRef.resolve(AbstractSootFieldRef.java:88)
>>>          at
>>> soot.AbstractSootFieldRef.resolve(AbstractSootFieldRef.java:74)
>>>          at
>>
>> soot.jimple.StaticFieldRef.getField(StaticFieldRef.java:76)
>>
>>>          at
>>>
>> soot.jimple.toolkits.typing.ConstraintCollector.caseAssignStmt(Constrai
>>
>>> ntCollector.java:236)
>>>          at
>>> soot.jimple.internal.JAssignStmt.apply(JAssignStmt.java:222)
>>>          at
>>>
>> soot.jimple.toolkits.typing.ConstraintCollector.collect(ConstraintColle
>>
>>> ctor.java:53)
>>>          at
>>>
>> soot.jimple.toolkits.typing.TypeResolver.collect_constraints_1_2(TypeRe
>>
>>> solver.java:330)
>>>          at
>>>
>> soot.jimple.toolkits.typing.TypeResolver.resolve_step_1(TypeResolver.ja
>>
>>> va:255)
>>>          at
>>>
>> soot.jimple.toolkits.typing.TypeResolver.resolve(TypeResolver.java:179)
>>
>>>          at
>>>
>> soot.jimple.toolkits.typing.TypeAssigner.internalTransform(TypeAssigner
>>
>>> .java:57)
>>>          at soot.BodyTransformer.transform(BodyTransformer.java:51)
>>>          at soot.Transform.apply(Transform.java:104)
>>>          at
>>> soot.JimpleBodyPack.applyPhaseOptions(JimpleBodyPack.java:70)
>>>          at soot.JimpleBodyPack.internalApply(JimpleBodyPack.java:93)
>>>          at soot.Pack.apply(Pack.java:120)
>>>          at
>>> soot.coffi.CoffiMethodSource.getBody(CoffiMethodSource.java:122)
>>>          at
>>
>> soot.SootMethod.getBodyFromMethodSource(SootMethod.java:81)
>>
>>>          at soot.SootMethod.retrieveActiveBody(SootMethod.java:320)
>>>          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:87)
>>>          at
>>>
>> soot.jimple.toolkits.callgraph.CHATransformer.internalTransform(CHATran
>>
>>> sformer.java:43)
>>>          at soot.SceneTransformer.transform(SceneTransformer.java:39)
>>>          at soot.Transform.apply(Transform.java:89)
>>>          at soot.RadioScenePack.internalApply(RadioScenePack.java:60)
>>>          at
>>>
>> soot.jimple.toolkits.callgraph.CallGraphPack.internalApply(CallGraphPac
>>
>>> k.java:40)
>>>          at soot.Pack.apply(Pack.java:110)
>>>          at
>>
>> soot.PackManager.runWholeProgramPacks(PackManager.java:375)
>>
>>>          at soot.PackManager.runPacks(PackManager.java:321)
>>>          at soot.Main.run(Main.java:203)
>>>          at soot.Main.main(Main.java:146) ======= #!/bin/bash
>>>
>>> SOOT=${HOME}/workspace_builtineclipse
>>> export JAVA_HOME=/usr/java/jdk1.5.0_06
>>>
>>> PADDLE=${SOOT}/paddle-dev/classes
>>> SOOTCLASSES=${SOOT}/soot-2.2.3/classes
>>> JEDDRUN=${HOME}/jedd-0.3/runtime/lib/jedd-runtime.jar
>>> JEDDTRANS=${HOME}/jedd-0.3/translator/lib/jedd-translator.jar
>>> JASMIN=${SOOT}/jasmin-2.2.3/lib/jasminclasses-2.2.3.jar
>>>
>>> export
>>>
>> JAVACLASSPATH=${JEDDRUN}:${JEDDTRANS}:${PADDLE}:${SOOTCLASSES}:${JASMIN
>>
>>> }:${SOOT}/polyglot-1.3.2/lib/polyglot.jar:${SOOT}/polyglot-
>>> 1.3.2/lib/java_cup.jar
>>>
>>> JRELIBPATH=${JAVA_HOME}/jre/lib/
>>>
>>> export
>>>
>> SOOTCLASSPATH=${JRELIBPATH}charsets.jar:${JRELIBPATH}deploy.jar:${JRELI
>> BPATH}javaws.jar:${JRELIBPATH}jce.jar:${JRELIBPATH}jsse.jar:${JRELIBPAT
>>
>>> H}plugin.jar:${JRELIBPATH}rt.jar:./
>>>
>>> echo $JAVACLASSPATH
>>> echo
>>> echo $SOOTCLASSPATH
>>> echo
>>> java  -Xmx1024m  \
>>>      -classpath $JAVACLASSPATH \
>>>      soot.Main \
>>>      -w \
>>>      -src-prec c \
>>>      -soot-classpath $SOOTCLASSPATH C \
>>>      -p cg enabled:true,jdkver:4,implicit-entry:false \
>>>      -p cg.cha enabled:true
>>>
>>> _______________________________________________
>>> Soot-list mailing list
>>> Soot-list at sable.mcgill.ca
>>> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>>
>>
>>
> _______________________________________________
> 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