Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.8.4, 2.0-beta-1
-
None
Description
There is a thread safety problem in ClassInfo class. Concurrent access to ClassInfo.modifiedExpandos (used in ClassInfo.setStrongMetaClass / clearModifiedExpandos) can cause an infinite loop.
Concurrent access to HashSet could cause an infinite loop when the tree data structure gets corrupted because of concurrent changes.
(http://lightbody.net/blog/2005/07/hashmapget_can_cause_an_infini.html , HashSet uses HashMap under the covers)
private static final Set<ClassInfo> modifiedExpandos = new HashSet<ClassInfo>();
modifiedExpandos seems to be used to maintain/clear strong references to EMCs? (ExpandoMetaClassCreationHandle.enable / disable calls ClassInfo.clearModifiedExpandos())
–
discussion on mailing list about ClassInfo.modifiedExpandos (in another context):