On Tue, 29 Oct 2024 16:52:45 GMT, Tom Rodriguez <ne...@openjdk.org> wrote:

> The notification that finalize is complete should be done after printing the 
> message because in Xcomp mode there might be a significant delay at the 
> println so the object hasn't actually been finalized yet.

It probably should be volatile just from a normal Java perspective but I don't 
think it matters for the correctness of this test.  I think the particular 
failure Graal was seeing was really because the System.runFinalization call 
that was added in the fix for JDK-6771058.  This creates a second thread which 
might be moving forward while the main FinalizerThread is stalled in an Xcomp 
triggered compilation.  In rare cases this lets the test finish before the 
first finalizable object has actually been finalized.  Anyway, it's all super 
rare and I can't reproduce the failure against the latest master.  I was able 
to reproduce and confirm the fix in local runs against earlier bits.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/21767#issuecomment-2450372063

Reply via email to