Re: JavaMemoryModel: Bugs in Tiger beta 1

From: Bill Pugh (pugh@cs.umd.edu)
Date: Tue Mar 09 2004 - 17:52:00 EST


That is a bug (seems to be a bunch of this pattern in
java.util.Scanner).

Does anybody with stronger Sun connections (Josh?) want to try to get
handled quicker than going through bug parade?

What other cases have you found? We should definitely get these
documented (and I should probably get Dave to write a bug pattern
detector for this case).

        Bill

On Mar 9, 2004, at 3:18 PM, Doron Rajwan wrote:

>> From browsing the sources of Tiger beta 1 I see lot of
> code that breaks the JMM. Should I use the bug parade
> for that?
>
> For example, from java.util.Scanner:
>
> private static Pattern boolPattern;
> private static final String BOOLEAN_PATTERN =
> "true|false";
> private static Pattern boolPattern() {
> if (boolPattern == null)
> boolPattern =
> Pattern.compile(BOOLEAN_PATTERN,
>
> Pattern.CASE_INSENSITIVE);
> return boolPattern;
> }
>
> This code must be fixed: boolPattern must be volatile.
>
> thanks,
> Doron.
>
>
> =====
> Doron Rajwan, mailto:doron@rajwan.org
>
> -------------------------------
> JavaMemoryModel mailing list -
> http://www.cs.umd.edu/~pugh/java/memoryModel

-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel



This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:59 EDT