On Mon, 13 Jul 2026 00:33:22 GMT, David Holmes <[email protected]> wrote:

>> Serguei Spitsyn has updated the pull request with a new target base due to a 
>> merge or a rebase. The incremental webrev excludes the unrelated changes 
>> brought in by the merge/rebase. The pull request contains three additional 
>> commits since the last revision:
>> 
>>  - Merge
>>  - review: moved to the right place the line which sets the objectCountMax
>>  - 8384882: jvmti/IterateOverReachableObjects/iterreachobj002 fails with Not 
>> a valid malloc pointer
>
> test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj002/iterreachobj002.cpp
>  line 42:
> 
>> 40: static volatile long objectCount = 0;
>> 41: static volatile long objectCountMax = 0;
>> 42: static volatile long objectTagCount = 0;
> 
> Pre-existing but we shouldn't be using `long`  due to different size on 
> Windows. I find the long/jlong conversions a bit hard to follow as well.

Good catch, thanks. In fact, it was a pre-existed issue in this test. Fixed now.

> test/hotspot/jtreg/vmTestbase/nsk/jvmti/IterateOverReachableObjects/iterreachobj002/iterreachobj002.cpp
>  line 79:
> 
>> 77:     /* Set tag */
>> 78:     *tag_ptr = (jlong)++objectTagCount;
>> 79:     objectCount++;
> 
> Shouldn't we only increment this if the allocation succeeds?

Good catch as well, thanks. Also, pre-existed. Not sure,  if this can cause an 
incorrect behavior though. But fixed now.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/31585#discussion_r3576184833
PR Review Comment: https://git.openjdk.org/jdk/pull/31585#discussion_r3576191879

Reply via email to