RFR: 8298783: java/lang/ref/FinalizerHistogramTest.java failed with "RuntimeException: MyObject is not found in test output" [v7]
Kim Barrett
kbarrett at openjdk.org
Thu May 1 19:33:48 UTC 2025
On Thu, 1 May 2025 19:17:42 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> It spins until at least one `MyObject` has entered `finalize()` before proceeding to fetch the histogram.
>
>> It spins until at least one `MyObject` has entered `finalize()` before proceeding to fetch the histogram.
>
> My eyes must be going. Somehow I read that as a `-1`.
I still think this loop isn't actually needed. What the test is interested in is having final references in the
finalizer queue. Waiting for reference processing does that. Waiting for trappedCount to be non-zero
(really, waiting for 1, with more than one indicating a problem with the locking and possible failure to
keep the objects in the finalizer queue), isn't necessary for the remainder of the test to work. I think
trappedCount isn't needed at all in the current version, and should either be removed or made useful in
some fashion.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24143#discussion_r2070702444
More information about the core-libs-dev
mailing list