RFR: 8340631: assert(reserved_rgn->contain_region(base_addr, size)) failed: Reserved CDS region should contain this mapping region [v10]

Matias Saavedra Silva matsaave at openjdk.org
Wed Jan 8 22:34:56 UTC 2025


> What testing with `UseCompressedClassPointers` set to false, this assert is hit due to memory being released twice during the failure path of CDS archive mapping. This patch makes it so the RW and RO regions are only released once at the end in `MetaspaceShared::release_reserved_spaces()`. 
> 
> This patch hides `unmap_region` as the method should not be called on regions that were reserved. Instead, the region is skipped and we verify that it is indeed in the reserved space. Verified` with tier 1-4 tests.

Matias Saavedra Silva has updated the pull request incrementally with one additional commit since the last revision:

  Replaced memset

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/22743/files
  - new: https://git.openjdk.org/jdk/pull/22743/files/bf1a4a21..516373b7

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=22743&range=09
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=22743&range=08-09

  Stats: 21 lines in 1 file changed: 9 ins; 11 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/22743.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/22743/head:pull/22743

PR: https://git.openjdk.org/jdk/pull/22743


More information about the hotspot-runtime-dev mailing list