On Sun, 20 Sep 2026 04:39:36 GMT, Ashutosh Mehra <[email protected]> wrote:

>> Vladimir Kozlov has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Update AOT code tests timeout value. Move two tests to tier2
>
> src/hotspot/share/cds/aotCacheAccess.cpp line 84:
> 
>> 82:   uintptr_t low_bound  = p2u(MetaspaceObj::aot_metaspace_base());
>> 83:   uintptr_t high_bound = p2u(MetaspaceObj::aot_metaspace_top());
>> 84:   if (base > low_bound || low_bound > high_bound) { // paranoid check
> 
> These checks can be done just once during AOTCache setup, not needed on every 
> read.

Moved to `AOTCacheAccess::map_aot_code_region()`

> src/hotspot/share/cds/aotCacheAccess.cpp line 91:
> 
>> 89: 
>> 90:   size_t offset = AOTCompressedPointers::get_byte_offset(narrowp);
>> 91:   if (offset == 0 || offset > 
>> AOTCompressedPointers::MaxMetadataOffsetBytes ||
> 
> IMO if we want these checks,  they should be put in 
> `AOTCompressedPointers::decode/decode_not_null` so that other code in 
> AOTCache is also protected against spurious/corrupted narrowPtr.

I would leave it here since only AOT Code Cache use this.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30778#discussion_r4058272664
PR Review Comment: https://git.openjdk.org/jdk/pull/30778#discussion_r4058274596

Reply via email to