On Mon, 9 Sep 2024 14:40:12 GMT, Daniel Fuchs <dfu...@openjdk.org> wrote:
>> test/lib/jdk/test/lib/util/ForceGC.java line 102: >> >>> 100: } >>> 101: } >>> 102: Reference.reachabilityFence(ref); >> >> I think everything from the creation of ref to the line above needs to >> enclosed in a try-statement, with the finally-clause including RF(ref). > > Arguably the same might also apply to the other call to reachability fence: > that is - we might need two try-finally to keep things by-the-book? I don't see a requirement for any try-finally's here, since I don't care about the queue/ref/referent/enqueuing for any exits other than running to the end of the function. Adding some might make the code less fragile against future changes, but adds clutter that might never provide any benefit. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20898#discussion_r1751250311