RFR: 8206406: StubCodeDesc constructor publishes partially-constructed objects on StubCodeDesc::_list

Andrew Haley aph at redhat.com
Thu Jul 5 13:36:36 UTC 2018


This is the same bug as
https://bugs.openjdk.java.net/browse/JDK-8138922.

However, that patch is rather more extensive and was never back-ported
to JDK 8.  We need this patch because recent builds are crashing.

I'm suggesting that a far simpler patch, very much like Vladimir
Ivanov's first one, is a better choice for JDK 8 at this point in its
life cycle.  It does what is needed and while it's not quite as
future-proof as the patch that was finally committed to JDK 9, it is
much less intrusive.  Making StubCodeDesc::_list itself volatile and
using release_store when StubCodeDesc::_list is updated is sufficient
for correct operation.

http://cr.openjdk.java.net/~aph/8206406-1/

Thoughts?

-- 
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671


More information about the jdk8u-dev mailing list