[Soot-list] Soot-2.4.0 bug? SynchObliviousMhpAnalysis.java:288 throws java.util.ConcurrentModificationException
Jeff
jeffwalt630 at gmail.com
Thu Jun 24 07:32:32 EDT 2010
Dear Eric and all,
I am using Soot-2.4.0 to analyze a multi-threaded application and the
following exception crashes the program:
Caused by: java.util.ConcurrentModificationException
at
java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
at java.util.AbstractList$Itr.next(AbstractList.java:343)
at
soot.jimple.toolkits.thread.mhp.SynchObliviousMhpAnalysis.run(SynchObliviousMhpAnalysis.java:288)
at
soot.jimple.toolkits.thread.mhp.SynchObliviousMhpAnalysis.buildMHPLists(SynchObliviousMhpAnalysis.java:61)
at
soot.jimple.toolkits.thread.mhp.SynchObliviousMhpAnalysis.<init>(SynchObliviousMhpAnalysis.java:47)
at
soot.jimple.toolkits.thread.mhp.UnsynchronizedMhpAnalysis.<init>(UnsynchronizedMhpAnalysis.java:7)
at
edu.hkust.clap.transformer.phase1.WholeProgramTransformer.internalTransform(WholeProgramTransformer.java:47)
.....
The corresponding source code @ SynchObliviousMhpAnalysis.run:
boolean addedNew = true;
while(addedNew)
{
addedNew = false;
Iterator<AbstractRuntimeThread> it =
runAtOnceCandidates.iterator();
while(it.hasNext())
{
288: AbstractRuntimeThread someThread = it.next();
SootMethod someStartMethod =
someThread.getStartStmtMethod();
if(mayHappenInParallelInternal(someStartMethod,
someStartMethod))
{
MHPLists.add(someThread); // add a second copy of it
someThread.setStartMethodMayHappenInParallel();
someThread.setRunsMany();
295: runAtOnceCandidates.remove(someThread);
if(optionPrintDebug)
G.v().out.println(someThread.toString());
addedNew = true;
}
}
}
Clearly the problem is caused by invoking "next()" on the List
"runAtOnceCandidates" at line 288 after calling "remove()" at line 295 on
it.
-Jeff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.cs.mcgill.ca/pipermail/soot-list/attachments/20100624/52f835d4/attachment.html
More information about the Soot-list
mailing list