RFR: 8315127: CDSMapTest fails with incorrect number of oop references [v2]

Ioi Lam iklam at openjdk.org
Fri Sep 1 22:49:07 UTC 2023


On Fri, 1 Sep 2023 04:31:33 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:

>> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   @calvinccheung and @turbanoff review comments
>
> test/hotspot/jtreg/runtime/cds/CDSMapReader.java line 312:
> 
>> 310:                     //     following line to oop+1
>> 311:                     mustContain(mapFile.oopToObject, field, oop, false);
>> 312:                     count1 ++;
> 
> Could `oop` be 0? If so, `oop` could be overcounted.
> 
> Pre-existing: extra import at line 27
> `import java.io.RandomAccessFile;`

I added checks for `oop != 0`, so now the test is counting only the non-null references.

> test/hotspot/jtreg/runtime/cds/CDSMapTest.java line 79:
> 
>> 77: 
>> 78:         CDSMapReader.MapFile mapFile = CDSMapReader.read(mapName);
>> 79:         CDSMapReader.validate(mapFile);
> 
> Pre-existing: extra import at lines 36 and 37
> 
> import java.io.FileInputStream;
> import java.io.IOException;

Fixed.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15527#discussion_r1313608359
PR Review Comment: https://git.openjdk.org/jdk/pull/15527#discussion_r1313608409


More information about the hotspot-runtime-dev mailing list