> From: Yilong Li [mailto:yilong...@runtimeverification.com] > Subject: Re: RV-Predict bugs
> Nope, I know what I am doing. Let's first see what the expert says. Please > check out the last section in this article ( > http://jeremymanson.blogspot.com/2008/12/benign-data-races-in-java.html) > which starts with "let's break the code". Here, we are talking about T2 in > the above example. The second read of the field hashCode is not > control-flow-dependent on the first read (the zero-check). Again, > intra-thread semantics introduces HB order between the event 3 and event 4. > But it doesn't ensure that event 4 must see the same value as event 3. The above article is limited specifically to the memory model and inter-thread semantics. While it's true that the memory model does not preclude reordering of the reads, the HB of intra-thread semantics does (Chapter 14 of the JLS): "A block is executed by executing each of the local variable declaration statements and other statements in order from first to last (left to right)." Otherwise, a single-thread program using the hashCode() example could return zero, and that clearly does not happen. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org