On Thu, 16 Jul 2026 15:23:09 GMT, Chris Plummer <[email protected]> wrote:
>> Serguei Spitsyn has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> review: removed objectCount var, ObjectFree event callback and related
>> capability
>
> test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj002/iterreachobj002.cpp
> line 322:
>
>> 320:
>> 321: /* Deallocate last unnecessary descriptor */
>> 322: if (!NSK_JVMTI_VERIFY(jvmti->Deallocate((unsigned
>> char*)objectDescList))) {
>
> This is a bit odd in that now the next field of the last initialized
> ObjectDescStruct in the list points to de-allocated memory. This doesn't
> cause issues because we don't use a NULL next pointer to indicate reaching
> the end of the list. We always walk objectCountMax entries. Maybe it would be
> better to do this Dealloc after initializing objectDescArr below, and at the
> same time also assert that objectDescList->next->next is NULL. Maybe a
> cleanup for another day.
Good observation, thanks. But it is better to stop polishing this test. I'd
refactor it first before doing it. My initial purpose what to fix the test
failures. :)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/31585#discussion_r3627462801