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

David Holmes david.holmes at oracle.com
Fri Jul 6 02:15:27 UTC 2018


On 5/07/2018 11:36 PM, Andrew Haley wrote:
> 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?

Well ... I never like to see a release_store without a corresponding 
load_acquire.

David



More information about the jdk8u-dev mailing list