It seems that the AbstractHost class got broken in commit
6216f5c ("Allow concurrent handling of tags").
For instance, calling the public AbstractHost.removeTag(...) method raises the
following exception:
java.lang.RuntimeException: Unsupported; this is a bad idea concurrently
at soot.util.ConcurrentList.remove(ConcurrentList.java:91)
at soot.tagkit.AbstractHost.removeTag(AbstractHost.java:64)
...
We could probably "fix" element removal by using mTagList.iterator()
(instead of using loops that depend on mTagList.size()).
But to be honest, I do not really understand the commit at all: for instance,
if two different threads call AbstractHost.addTag(...) on the same instance,
both threads could execute the
if (mTagList == null) {
mTagList = new ConcurrentList<Tag>();
codepath. Is this the intended behavior?
It seems that the AbstractHost class got broken in commit
6216f5c ("Allow concurrent handling of tags").
For instance, calling the public AbstractHost.removeTag(...) method raises the
following exception:
We could probably "fix" element removal by using mTagList.iterator()
(instead of using loops that depend on mTagList.size()).
But to be honest, I do not really understand the commit at all: for instance,
if two different threads call AbstractHost.addTag(...) on the same instance,
both threads could execute the
codepath. Is this the intended behavior?