On Tue, 26 Jul 2022 21:44:19 GMT, Roger Riggs <rri...@openjdk.org> wrote:
> The intermittent test failure was due to the WeakReferences being > unreferenced too early. > Adding a Reference.reachabilityFence to the test makes it robust. > > Remove from ProblemList-Xcomp.txt Hello Roger, considering that the `wCanary` array will be "alive" at least till the end of the loop at line 126 (the loop within which we create the `WeakReference` instances and register them with the `refQueue`), shouldn't the `refQueue` be enqueued with these `WeakReference`s, even if `wCanary` gets unreferenced at line 126? Thus, shouldn't the `refQueue` have these unreferenced instances at line 169 - the place where we call `refQueue.remove(Utils.adjustTimeout(30 * 1000L));`? ------------- PR: https://git.openjdk.org/jdk/pull/9649