RFR: 8357060: [premain] assert(left >= right) failed: avoid underflow

Ashutosh Mehra asmehra at openjdk.org
Fri May 16 16:15:04 UTC 2025


On Fri, 16 May 2025 16:11:37 GMT, Ashutosh Mehra <asmehra at openjdk.org> wrote:

>> src/hotspot/share/code/aotCodeCache.cpp line 1998:
>> 
>>> 1996:         continue;
>>> 1997:       }
>>> 1998:       Method* m = (Method*)((address)SharedBaseAddress + entry->method_offset());
>> 
>> Why not `MetaspaceShared::requested_base_address()` here?
>
> Because when loading the AOT Cache, SharedBaseAddress is set to the mapped base address (in `MetaspaceShared::map_archives`). So it is fine to use it here.

Same applies to `AOTCodeReader::read_klass` and `AOTCodeReader::read_method`.

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

PR Review Comment: https://git.openjdk.org/leyden/pull/68#discussion_r2093330139


More information about the leyden-dev mailing list