[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Option -W
Soot is saying that the SootClass for java.lang.String doesn't have the
constructor that is being called from some other class. This could be
either because Soot has read in some corrupted version of
java.lang.String without this method, or because of some bug in Soot
that makes it not find the method even though it is there. I am not
aware of any such bug.
There are two more things you could try. You could put the rt.jar first
in your Soot classpath, before the jvm98, to ensure that Soot reads the
java.lang.String from the rt.jar. You can use
jar tf $HOME/j2sdk1.3.1/jre/lib/rt.jar | grep String.class
to make sure that the rt.jar does in fact contain java.lang.String.
The other thing you could try is to have Soot process whichever
java.lang.String it is finding and print out the Jimple, so you can see
whether it has the required constructor or not:
java soot.Main -d tempdb -f jimple -soot-class-path
$HOME/Benchmark/jvm98:$HOME/j2sdk1.3.1/jre/lib/rt.jar
java.lang.String
Then look in tempdb for a java.lang.String.jimple, and see if it has a
constructor that takes a byte[].
Ondrej
On Thu, Aug 14, 2003 at 12:24:45PM +1000, Phung Hua Nguyen wrote:
> Hi All,
>
> Thank you for your reply. I tried again with $HOME but it still didn't
> work. For more information, the version of Soot I used is 2.0.1.
> java soot.Main -app -W -d tempdb -f jimple -soot-class-path
> $HOME/Benchmark/jvm98:$HOME/j2sdk1.3.1/jre/lib/rt.jar
> spec.benchmarks._209_db.Main
>
> Soot started on Thu Aug 14 12:00:47 EST 2003
> [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: Class
> java.lang.String doesn't have method <init>([byte[]]) : void; failed to
> resolve in superclasses and interfaces
> at soot.SootClass.getMethod(SootClass.java:427)
> at soot.coffi.CFG.generateJimple(CFG.java:4498)
> at soot.coffi.CFG.jimplify(CFG.java:1436)
> at soot.coffi.CFG.jimplify(CFG.java:1099)
> at soot.coffi.CoffiMethodSource.getBody(CoffiMethodSource.java:98)
> at soot.SootMethod.getBodyFromMethodSource(SootMethod.java:79)
> at soot.SootMethod.retrieveActiveBody(SootMethod.java:274)
> at
> soot.jimple.toolkits.callgraph.CallGraphBuilder.processNewMethod(CallGraphBuilder.java:114)
> at
> soot.jimple.toolkits.callgraph.CallGraphBuilder.processWorklist(CallGraphBuilder.java:93)
> at
> soot.jimple.toolkits.callgraph.CallGraphBuilder.build(CallGraphBuilder.java:81)
> at
> soot.jimple.toolkits.callgraph.CHATransformer.internalTransform(CHATransformer.java:43)
> at soot.SceneTransformer.transform(SceneTransformer.java:39)
> at soot.Transform.apply(Transform.java:79)
> at soot.RadioScenePack.internalApply(RadioScenePack.java:60)
> at
> soot.jimple.toolkits.callgraph.CallGraphPack.internalApply(CallGraphPack.java:36)
> at soot.Pack.apply(Pack.java:104)
> at soot.PackManager.runWholeProgramPacks(PackManager.java:263)
> at soot.PackManager.runPacks(PackManager.java:246)
> at soot.Main.run(Main.java:172)
> at soot.Main.main(Main.java:152)
>
> Thanks in advance,
>
> Phung
> On Wed, 13 Aug 2003, Ondrej Lhotak wrote:
>
> > This looks like it might problem with the classpath. Try replacing the ~
> > with $HOME and let us know whether that fixes the problem.
> >
> > Ondrej
> >
> > On Wed, Aug 13, 2003 at 03:53:19PM +1000, Phung Hua Nguyen wrote:
> > > Hi all,
> > >
> > > When I tried soot like this:
> > > java soot.Main --app -d tempdb -f jimple -soot-class-path
> > > ~/Benchmark/jvm98:~
> > > /j2sdk1.3.1/jre/lib/rt.jar spec.benchmarks._209_db.Main
> > > it works well.
> > > However, when I add option -W to make it do
> > > whole-program optimizations, it gives errors:
> > > java soot.Main --app -W -d tempdb -f jimple
> > > -soot-class-path ~/Benchmark/jvm98:~/j2sdk1.3.1/jre/lib/rt.jar
> > > spec.benchmarks._209_db.Main
> > >
> > > Soot started on Wed Aug 13 15:43:05 EST 2003
> > > [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: Class
> > > java.lang.String doesn't have method <init>([byte[]]) : void; failed to
> > > resolve in superclasses and interfaces
> > > at soot.SootClass.getMethod(SootClass.java:427)
> > > at soot.coffi.CFG.generateJimple(CFG.java:4498)
> > >
> > > Could you please help me solve this problem? Please forgive me if it is a
> > > dump question.
> > >
> > > Nguyen Hua Phung
> > > University of New South Wales
> >
>
> Nguyen Hua Phung
> University of New South Wales