[10?] RFR (XS): 8129440: G1 crash during concurrent root region scan (original) (raw)

Thomas Schatzl thomas.schatzl at oracle.com
Thu Dec 7 12:04:05 UTC 2017


Hi,

On Thu, 2017-12-07 at 10:14 +0100, Erik Helin wrote:

On 12/06/2017 08:17 PM, Thomas Schatzl wrote: > Hi all, > > can I have reviews for this small change that prevents C++ > compilers from generating code that reloads oop value from the heap > instead of using a local variable in concurrent marking closures. > This can cause issues if this reloading occurs after the originally > loaded value has been checked for NULL to prevent SIGSEGVs and the > mutator changed the value in the meantime. > > E.g. > > oop o = loadfromheap(p); > if (o == NULL) { > return; > } > // do something with o; potential crash here when reloading from > p > instead of actually reusing o > > According to SAP particularly the IBM xlc compiler tends to to such > nasty things (which is completely okay from a language POV). > > The fix is to make the load from the heap a volatile load using the > new AccessBarrier API in cases this can happen. > > CR: > https://bugs.openjdk.java.net/browse/JDK-8129440 > Webrev: > http://cr.openjdk.java.net/~tschatzl/8129440/webrev/

Looks good, Reviewed.

thanks for your review.

Thomas



More information about the hotspot-gc-dev mailing list