Community
Participate
Working Groups
Build Identifier: Trunk version In method "public static MarkerSupportRegistry getInstance()" of class MarkerSupportRegistry, double checked locking idiom is used. But the field "singleton" involved in the idiom is not declared with volatile modifier which is incorrect. Simply add volatile modifier in field annotations declaration can quickly fix the problem. Below link and description explain the details. http://www.cs.umd.edu/~pugh/java/memoryModel/jsr-133-faq.html#dcl Reproducible: Didn't try Steps to Reproduce: This kind of concurrency error depends on thread interleaving in runtime, it may occur surprisingly in certain run which is very difficult to track the bug.
Created attachment 158816 [details] patch to fix this bug
(In reply to Daniel Luo from comment #1) > Created attachment 158816 [details] > patch to fix this bug Daniel, Thanks for pointing the "double-checked locking" issue. I've prepared the patch for Gerrit basing on the common practice that we use in the Platform for lazy creating the singletons Gerrit review link: https://git.eclipse.org/r/#/c/16762/ Daniel R.
Submitted with http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=565a21ee8779cfe82e989c4a8f3457b162b31feb
Verified in the build: I20131028-2000