Fwd: RFR: 8181085: Race condition in method resolution may produce spurious NullPointerException (original) (raw)
Andrew Dinn adinn at redhat.com
Thu May 25 16:25:38 UTC 2017
- Previous message: Fwd: RFR: 8181085: Race condition in method resolution may produce spurious NullPointerException
- Next message: Fwd: RFR: 8181085: Race condition in method resolution may produce spurious NullPointerException
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Apologies but this RFR is retracted -- the problem only applies to jdk8.
I will be posting a revised RFR to jdk8u.
regards,
Andrew Dinn
Senior Principal Software Engineer Red Hat UK Ltd Registered in England and Wales under Company Registration No. 03798903 Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander
On 25/05/17 14:16, Andrew Dinn wrote:
Forwarding this to hotpsot-dev which is probably the more appropriate destination.
-------- Forwarded Message -------- Subject: RFR: 8181085: Race condition in method resolution may produce spurious NullPointerException Date: Thu, 25 May 2017 14:12:53 +0100 From: Andrew Dinn <adinn at redhat.com> To: jdk10-dev <jdk10-dev at openjdk.java.net> The following webrev fixes a race condition that is present in jdk10 and also jdk9 and jdk8. It is caused by a misplaced volatile keyword that faild to ensure correct ordering of writes by the compiler. Reviews welcome. http://cr.openjdk.java.net/~adinn/8181085/webrev.00/ Backporting: This same fix is required in jdk9 and jdk8. Testing: The reproducer posted with the original issue manifests the NPE reliably on jdk8. It does not manifest on jdk9/10 but that is only thanks to changes introduced into the resolution process in jdk9 which change the timing of execution. However, without this fix the out-of-order write problem is still present in jdk9/10, as can be seen by eyeballing the compiled code for ConstantPoolCacheEntry::setdirectorvtablecall. The patch has been validated on jdk8 by running the reproducer. It stops any resulting NPEs. The code for ConstantPoolCacheEntry::setdirectorvtablecall on jdk8-10 has been eyeballed to ensure that post-patch the assignments now occur in the correct order. regards, Andrew Dinn ----------- Senior Principal Software Engineer Red Hat UK Ltd Registered in England and Wales under Company Registration No. 03798903 Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander
- Previous message: Fwd: RFR: 8181085: Race condition in method resolution may produce spurious NullPointerException
- Next message: Fwd: RFR: 8181085: Race condition in method resolution may produce spurious NullPointerException
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]