On Fri, 10 Feb 2023 17:50:40 GMT, Mark Sheppard <mshep...@openjdk.org> wrote:
>> @msheppar It depends on the timing of GC and the unpredictable interactions >> between the compiler and gc. >> If gc is particularly aggressive (as may be stimulated by -Xcomp), it may >> determine that the impl is no longer referenced even though it seems to be >> in the middle of the method. > > Would this behaviour be covered by the JLS and JVM specs ? The JLS and JVMS specs do not constrain the implementation of GC. The reachabilityFence() was introduced in JDK 9 by https://bugs.openjdk.org/browse/JDK-8133348. ------------- PR: https://git.openjdk.org/jdk/pull/12399