RFR: 8346971: [ubsan] psCardTable.cpp:131:24: runtime error: large index is out of bounds [v2]

Kim Barrett kbarrett at openjdk.org
Mon Jan 13 15:19:52 UTC 2025


On Mon, 13 Jan 2025 12:12:17 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> Kim Barrett has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   typo: intptr_t => uintptr_t
>
> src/hotspot/share/gc/parallel/psCardTable.cpp line 149:
> 
>> 147:     assert(iaddr(card) >= iaddr(_table), "out of bounds");
>> 148:     assert(iaddr(card) <= (iaddr(_table) + sizeof(_table)), "out of bounds");
>> 149:   }
> 
> The two impls look identical to me. Also, can you change `check` to `verify` to make it more explicit that they are for verification only?

They certainly used to be different; not sure how that crept in.  I'll push after rerunning tests.
Rename suggestion is fine, and adopted.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23032#discussion_r1913358972


More information about the hotspot-gc-dev mailing list