[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
concurrentmodification exception during jimplication
Hi Alex,
I had a chance to examine the bug you reported.
http://gloom.cs.mcgill.ca/soot/incoming?id=44;user=guest;addsignature=1
In summary, the bug has to do with a ConcurrentModificationException
thrown during the jimplification of com.ibm.jikesbt.BT_Class, which is
part of IBM's Jikes Bytecode Toolkit. No source is provided for this
class.
The problem is that com.ibm.jikesbt.BT_Class has a method which refers to
the BT_Class.becomePublic() method. Unfortunately, no such method exists:
the class is malformed. Since source is not provided, I don't know how
the class could've compiled, except with bytecode manipulations after the
fact.
Soot's default behaviour in that case is to create a 'phantom' method
declaration for such a method.
In this case, that workaround happens to fail because the phantom method
creation modifies the methods list of BT_Class while it is being iterated
on.
I could put an additional workaround into Soot so that it could jimplify
this incorrect code, but this would slow down the execution of Soot on
correct classfiles. I don't think this is a good tradeoff.
If you modify your copy of Soot, though, so that the iterator used in line
65 of soot.jimple.toolkits.invoke.ClassHierarchyAnalysis is a
snapshotIterator, then you should be able to run your command.
Alternately, you can 'fix' the classfile by running it through Soot once;
this would then require that the iterator on line 1794 of soot.Main be a
snapshotIterator.
Good luck!
pat