DO NOT REPLY [Bug 49972] Double-check idiom. Possible data-race.

2010-10-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49972 Mark Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|

DO NOT REPLY [Bug 49972] Double-check idiom. Possible data-race.

2010-10-07 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49972 --- Comment #9 from Mark Thomas 2010-10-07 10:07:22 EDT --- Fixed in trunk and proposed for 6.0.x -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You ar

DO NOT REPLY [Bug 49972] Double-check idiom. Possible data-race.

2010-09-23 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49972 --- Comment #8 from Kostya Serebryany 2010-09-23 04:03:35 EDT --- >> If there were no possibility of an exception, your statement would be true. I am not sure about this particular case, but in general a compiler (JIT) may statically figur

DO NOT REPLY [Bug 49972] Double-check idiom. Possible data-race.

2010-09-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49972 --- Comment #7 from Chuck Caldarale 2010-09-22 12:58:53 EDT --- (In reply to comment #5) > Also, there are problem with 64 bit variable currentDateGenerated This is a problem (albeit a fairly minor one); technically, the field should be m

DO NOT REPLY [Bug 49972] Double-check idiom. Possible data-race.

2010-09-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49972 --- Comment #6 from Chuck Caldarale 2010-09-22 12:53:46 EDT --- (In reply to comment #4) > > The simple fix is to just reverse these two lines: > I afraid, it won't work. > The compiler is free to reverse these lines back. Not in this ca

DO NOT REPLY [Bug 49972] Double-check idiom. Possible data-race.

2010-09-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49972 --- Comment #5 from Sergey Vorobyev 2010-09-22 11:46:36 EDT --- Also, there are problem with 64 bit variable currentDateGenerated http://java.sun.com/docs/books/jls/third_edition/html/memory.html quote: For the purposes of the Java progra

DO NOT REPLY [Bug 49972] Double-check idiom. Possible data-race.

2010-09-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49972 --- Comment #4 from Kostya Serebryany 2010-09-22 10:53:58 EDT --- >> The simple fix is to just reverse these two lines: I afraid, it won't work. The compiler is free to reverse these lines back. (maybe not in this particular case, but ce

DO NOT REPLY [Bug 49972] Double-check idiom. Possible data-race.

2010-09-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49972 --- Comment #3 from Chuck Caldarale 2010-09-22 10:20:36 EDT --- (In reply to comment #2) > It looks scarier than that. > In short, see > http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html Not all double-checked lockin

DO NOT REPLY [Bug 49972] Double-check idiom. Possible data-race.

2010-09-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49972 --- Comment #2 from konstantin.s.serebry...@gmail.com 2010-09-22 09:56:49 EDT --- It looks scarier than that. In short, see http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html Case1: Thread1 executes: long no

DO NOT REPLY [Bug 49972] Double-check idiom. Possible data-race.

2010-09-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49972 konstantin.s.serebry...@gmail.com changed: What|Removed |Added CC||konstantin.s.ser

DO NOT REPLY [Bug 49972] Double-check idiom. Possible data-race.

2010-09-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49972 --- Comment #1 from Sebb 2010-09-22 06:53:24 EDT --- The currentDateGenerated field is read outside the synch. block, and is not volatile. So if one thread calls getCurrentDate() and updates the field, another thread calling getCurrentDate

DO NOT REPLY [Bug 49972] Double-check idiom. Possible data-race.

2010-09-22 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=49972 Sergey Vorobyev changed: What|Removed |Added CC||sergeyvorob...@google.com