[Soot-list] excluding javax.realtime.ImmortalMemory
Chris Pickett
chris.pickett at mail.mcgill.ca
Sat Jun 23 22:11:22 EDT 2007
Hi,
I'm trying to run Soot in whole-program mode with IBM's 1.5.0-SR1 SDK.
I don't seem to have the class javax.realtime.ImmortalMemory in any of
the .jar files. It looks like it's part of real time Java only, not the
standard distribution. grep couldn't find the string "realtime"
anywhere, never mind "Immortal".
Does anybody have ideas as to how I might get past this exception? I
was thinking perhaps I could hard-code the class name into some Soot
resolver class, but I'm not really sure where; letting it exist as a
phantom reference only introduces errors later. I tried -x javax. and
-x javax but to no avail. If I can't get this to work, it looks like
I'll have to do the transformations with Sun's classes and then run the
output with IBM's VM... which should be possible, but it's more
difficult to work with, since Sun's VM doesn't run under AIX and I'll
have to do lots and lots of file transfers.
$ java -Xmx1024m soot.Main --cp
.:$JAVA_HOME/lib/core.jar:$JAVA_HOME/lib/vm.jar:$JAVA_HOME/lib/graphics.jar:$JAVA_HOME/lib/security.jar:$JAVA_HOME/lib/ibmpkcs.jar
-w spec.benchmarks._227_mtrt.Main
Soot started on Sat Jun 23 20:28:43 EDT 2007
Exception in thread "main" java.lang.RuntimeException: couldn't find
class: javax.realtime.ImmortalMemory (is your soot-class-path set properly?)
at soot.SootResolver.bringToHierarchy(SootResolver.java:133)
at soot.SootResolver.bringToSignatures(SootResolver.java:166)
at soot.SootResolver.bringToBodies(SootResolver.java:207)
at soot.SootResolver.processResolveWorklist(SootResolver.java:94)
at soot.SootResolver.resolveClass(SootResolver.java:83)
at soot.Scene.tryLoadClass(Scene.java:330)
at soot.Scene.loadBasicClasses(Scene.java:880)
at soot.Scene.loadNecessaryClasses(Scene.java:906)
at soot.Main.run(Main.java:169)
at soot.Main.main(Main.java:145)
That's otherwise a minimal set of jar files, which was built up in order
to find java.lang.Object (core.jar), java.lang.String (vm.jar),
java.awt.AWTPermission (graphics.jar),
javax.security.auth.AuthPermission (security.jar), and
com.ibm.security.x509.X509CertImpl (ibmpkcs.jar).
If I specify every single .jar file in the distribution, I get:
Soot started on Sat Jun 23 20:20:42 EDT 2007
Exception in thread "main" java.lang.RuntimeException: Caught
IOException java.util.zip.ZipException: Error opening zip file
/work_jit/JVM/sdk150-20060310-SR1/lib/dt.jar looking in jar file
/work_jit/JVM/sdk150-20060310-SR1/lib/dt.jar for file
spec/benchmarks/_227_mtrt/Main.class
at soot.SourceLocator.lookupInJar(SourceLocator.java:400)
at soot.SourceLocator.lookupInClassPath(SourceLocator.java:378)
at soot.CoffiClassProvider.find(CoffiClassProvider.java:31)
at soot.SourceLocator.getClassSource(SourceLocator.java:43)
at soot.SootResolver.bringToHierarchy(SootResolver.java:130)
at soot.SootResolver.bringToSignatures(SootResolver.java:166)
at soot.SootResolver.processResolveWorklist(SootResolver.java:98)
at soot.SootResolver.resolveClass(SootResolver.java:83)
at soot.Scene.loadClass(Scene.java:361)
at soot.Scene.loadClassAndSupport(Scene.java:346)
at soot.Scene.loadNecessaryClass(Scene.java:893)
at soot.Scene.loadNecessaryClasses(Scene.java:912)
at soot.Main.run(Main.java:169)
at soot.Main.main(Main.java:145)
and if I get rid of dt.jar then it falls back to the
javax.realtime.ImmortalMemory exception.
If I pass -allow-phantom-refs then I get this:
Soot started on Sat Jun 23 22:00:47 EDT 2007
Warning: javax.realtime.ImmortalMemory is a phantom class!
[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: Jimplification
requires javax.realtime.ImmortalMemory, but it is a phantom ref.
at soot.jimple.toolkits.typing.TypeNode.<init>(TypeNode.java:84)
at
soot.jimple.toolkits.typing.ClassHierarchy$ConstructorChooser.caseRefType(ClassHierarchy.java:233)
at soot.RefType.apply(RefType.java:142)
at
soot.jimple.toolkits.typing.ClassHierarchy$ConstructorChooser.typeNode(ClassHierarchy.java:226)
at
soot.jimple.toolkits.typing.ClassHierarchy.typeNode(ClassHierarchy.java:123)
at
soot.jimple.toolkits.typing.TypeResolver.typeVariable(TypeResolver.java:135)
at
soot.jimple.toolkits.typing.ConstraintCollector.caseAssignStmt(ConstraintCollector.java:450)
at soot.jimple.internal.JAssignStmt.apply(JAssignStmt.java:221)
at
soot.jimple.toolkits.typing.ConstraintCollector.collect(ConstraintCollector.java:50)
at
soot.jimple.toolkits.typing.TypeResolver.collect_constraints_1_2(TypeResolver.java:330)
at
soot.jimple.toolkits.typing.TypeResolver.resolve_step_1(TypeResolver.java:255)
at
soot.jimple.toolkits.typing.TypeResolver.resolve(TypeResolver.java:180)
at
soot.jimple.toolkits.typing.TypeAssigner.internalTransform(TypeAssigner.java:55)
at soot.BodyTransformer.transform(BodyTransformer.java:51)
at soot.Transform.apply(Transform.java:104)
at soot.JimpleBodyPack.applyPhaseOptions(JimpleBodyPack.java:66)
at soot.JimpleBodyPack.internalApply(JimpleBodyPack.java:89)
at soot.Pack.apply(Pack.java:120)
at soot.coffi.CoffiMethodSource.getBody(CoffiMethodSource.java:117)
at soot.SootMethod.getBodyFromMethodSource(SootMethod.java:82)
at soot.SootMethod.retrieveActiveBody(SootMethod.java:329)
at
soot.jimple.toolkits.callgraph.OnFlyCallGraphBuilder.processNewMethod(OnFlyCallGraphBuilder.java:181)
at
soot.jimple.toolkits.callgraph.OnFlyCallGraphBuilder.processReachables(OnFlyCallGraphBuilder.java:81)
at
soot.jimple.toolkits.callgraph.CallGraphBuilder.build(CallGraphBuilder.java:83)
at
soot.jimple.toolkits.callgraph.CHATransformer.internalTransform(CHATransformer.java:43)
at soot.SceneTransformer.transform(SceneTransformer.java:39)
at soot.Transform.apply(Transform.java:89)
at soot.RadioScenePack.internalApply(RadioScenePack.java:57)
at
soot.jimple.toolkits.callgraph.CallGraphPack.internalApply(CallGraphPack.java:41)
at soot.Pack.apply(Pack.java:110)
at soot.PackManager.runWholeProgramPacks(PackManager.java:405)
at soot.PackManager.runPacks(PackManager.java:326)
at soot.Main.run(Main.java:202)
at soot.Main.main(Main.java:145)
Maybe I can change some method in the above trace? Which one?
Thanks!
Chris
More information about the Soot-list
mailing list