[jmm-dev] easily observable examples of non-sc behaviours in Java

Aleksey Shipilev aleksey.shipilev at oracle.com
Thu Jan 15 19:25:11 UTC 2015

On 01/15/2015 10:22 PM, Aleksey Shipilev wrote:
> Hotspot does this routinely. This opens up an interesting class of bugs:
> busy-waiting on some condition may stuck indefinitely. This is
> especially "fun" in intrinsics, e.g. these two interesting bugs:

Or, in jcstress-speak:

>  a) busy-waiting on Reference.get(): Hotspot intrinsifies the call, but
> forgets the barrier, loop optimizations then move out the predicate out
> of the loop, boom: https://bugs.openjdk.java.net/browse/JDK-7190310


>  b) busy-waiting on Thread.currentThread().isInterrupted(): same thing,
> but amusingly only in OSR stub, boom:
> https://bugs.openjdk.java.net/browse/JDK-8003135



More information about the jmm-dev mailing list