RFR: 8132306: java/lang/ref/ReferenceEnqueue.java fails with "RuntimeException: Error: poll() returned null; expected ref object"
kim.barrett at oracle.com
Wed Jul 29 07:57:28 UTC 2015
Please review this fix of a race condition in
j.l.r.Reference/ReferenceQueue. See comments in the bug report for a
description of the race. The race is being fixed by reordering a pair
of volatile assignments.
jprt with default and hotspot testsets
Locally tested race in original code by insertion of sleep in enqueue and
verifying ReferenceEnqueue regression test fails consistently as
described in the bug report.
Locally tested fixed code by insertion of sleeps at various points and
verifying ReferenceEnqueue regression test still passes.
More information about the hotspot-gc-dev