Fallacy in sample

Aleksey Shipilev shade at redhat.com
Sun Sep 2 09:12:22 UTC 2018


On 09/02/2018 01:43 AM, Vadim Semenov wrote:
> Seems that following [1] outcome should be forbidden in JMM. It violates
> synchronization order between unlock and lock actions on a monitor, doesn't
> it?
> 
> [1]
> http://hg.openjdk.java.net/code-tools/jcstress/file/64f2cf32fa0a/jcstress-samples/src/main/java/org/openjdk/jcstress/samples/JMMSample_04_PartialOrder.java#l192

Yup, that is a copy-paste error. Fixed:
  http://hg.openjdk.java.net/code-tools/jcstress/rev/ff7cf32e6950

-Aleksey




More information about the jcstress-dev mailing list