RFR: 8340631: assert(reserved_rgn->contain_region(base_addr, size)) failed: Reserved CDS region should contain this mapping region [v12]
Ioi Lam
iklam at openjdk.org
Thu Jan 9 16:50:40 UTC 2025
On Thu, 9 Jan 2025 16:04:35 GMT, Matias Saavedra Silva <matsaave at openjdk.org> wrote:
>> src/hotspot/share/cds/filemap.cpp line 1895:
>>
>>> 1893: assert(requested_addr != nullptr, "must be specified");
>>> 1894:
>>> 1895: r->set_mapped_from_file(false);
>>
>> Need to add `r->set_in_reserved_space(false);` here, as the `r` can be used twice (first map at requested location; if that fails, map at random location).
>
> Does that belong here or should it be placed in `init()`?
`FileMapRegion::init()` is called once, during dump time. `r->set_in_reserved_space(false)` should be called there as well.
During run time, `FileMapInfo::map_region()` can be called twice, on the same index `i`, so the `_in_reserved_space` needs to be reset at the beginning of each call. That would be similar to what we do with `_mapped_from_file`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22743#discussion_r1909151086
More information about the hotspot-runtime-dev
mailing list