[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: jdk1.4 problems.
Hi Stephen,
I haven't try soot-1.2.2 on JDK1.4, but tried soot-1.2.3, I did not find
the source of the problem, but here is a quick hacker to make it runable
on JDK1.4
In soot/jimple/toolkits/invoke/ClassHierarchyAnalysis.java
replace line 67 :
Iterator methodsIt = c.getMethods().iterator();
by:
Iterator methodsIt = c.getMethods().snapshotIterator();
It is not verified that this change won't affect others. (look at the
code, it is not supposed to be).
Cheers,
===========================================================
Feng Qian fqian@sable.mcgill.ca
On Mon, 13 May 2002, Stephen Andrew Neuendorffer wrote:
>
> See attached java file... This uses the HashMap class. under jdk1.4,
> there are some conflict with new java.util classes (IdentityHashMap and
> LinkedHashMap) that use private abstract inner classes...
>
> Under soot 1.2.2:
> Steve% soot --app -W test
> TINI_DIR: not found
> CLASSPATHSEPARATOR: not found
> TINI_DIR: not found
> "d:/jdk1.4/bin/java" "-Dptolemy.ptII.dir=c:/users/neuendor/ptII" -classpath
> "c:\
> users\neuendor\ptII;c:/users/neuendor/ptII/lib/sootclasses.jar;c:/users/neuendor
> /ptII/lib/jasminclasses.jar;d:\jdk1.4\jre\lib\rt.jar" soot.Main --app -W test
> Soot started on Mon May 13 11:38:10 PDT 2002
> java.lang.RuntimeException: could not resolve concrete dispatch!
> Type: java.util.LinkedHashMap$LinkedHashIterator
> Method: <java.util.Iterator: java.lang.Object next()>
> at soot.Hierarchy.resolveConcreteDispatch(Hierarchy.java:455)
> at soot.Hierarchy.resolveAbstractDispatch(Hierarchy.java:503)
> at
> soot.jimple.toolkits.invoke.ClassHierarchyAnalysis.newInvokeGraph(Cla
> ssHierarchyAnalysis.java:91)
> at
> soot.jimple.toolkits.invoke.InvokeGraphBuilder.internalTransform(Invo
> keGraphBuilder.java:47)
> at soot.SceneTransformer.transform(SceneTransformer.java:46)
> at soot.SceneTransformer.transform(SceneTransformer.java:58)
> at
> soot.jimple.toolkits.invoke.StaticInliner.internalTransform(StaticInl
> iner.java:61)
> at soot.SceneTransformer.transform(SceneTransformer.java:46)
> at soot.Pack.apply(Pack.java:79)
> at soot.Main.run(Main.java:1535)
> at java.lang.Thread.run(Thread.java:536)
>
>
> Under soot 1.2.3 a different problem appears:
> soot --app -W test
> TINI_DIR: not found
> CLASSPATHSEPARATOR: not found
> TINI_DIR: not found
> "d:/jdk1.4/bin/java" "-Dptolemy.ptII.dir=c:/users/neuendor/ptII" -classpath
> "c:\
> users\neuendor\ptII;c:/users/neuendor/ptII/lib/sootclasses.jar;c:/users/neuendor
> /ptII/lib/jasminclasses.jar;d:\jdk1.4\jre\lib\rt.jar" soot.Main --app -W test
> Soot started on Mon May 13 11:24:12 PDT 2002
> java.util.ConcurrentModificationException
> at soot.util.HashChain$LinkIterator.hasNext(HashChain.java:465)
> at
> soot.jimple.toolkits.invoke.ClassHierarchyAnalysis.newInvokeGraph(Cla
> ssHierarchyAnalysis.java:68)
> at
> soot.jimple.toolkits.invoke.ClassHierarchyAnalysis.newInvokeGraph(Cla
> ssHierarchyAnalysis.java:42)
> at
> soot.jimple.toolkits.invoke.InvokeGraphBuilder.internalTransform(Invo
> keGraphBuilder.java:47)
> at soot.SceneTransformer.transform(SceneTransformer.java:46)
> at soot.SceneTransformer.transform(SceneTransformer.java:58)
> at
> soot.jimple.toolkits.invoke.StaticInliner.internalTransform(StaticInl
> iner.java:61)
> at soot.SceneTransformer.transform(SceneTransformer.java:46)
> at soot.Pack.apply(Pack.java:79)
> at soot.Main.run(Main.java:1611)
> at java.lang.Thread.run(Thread.java:536)
> Steve%
>
> This test works under jdk1.3.1 with both versions of soot...
- References:
- jdk1.4 problems.
- From: "Stephen Andrew Neuendorffer" <neuendor@eecs.berkeley.edu>