RFR: 8352508: [Redo] G1: Pinned regions with pinned objects only reachable by native code crash VM [v3]

Thomas Schatzl tschatzl at openjdk.org
Mon Mar 24 10:14:51 UTC 2025


> Hi all,
> 
>   please review this change that re-implements the fix for [JDK-8351921](https://bugs.openjdk.org/browse/JDK-8351921); in that fix we (think we) forgot to consider the same situation with optional regions.
> 
> I.e. the previous fix only fixed the situation occurring during initial evacuation, however as we add regions due to optional evacuation, the same situation can still happen.
> 
> So this change adds some work to every evacuation phase that marks all pinned regions in the current collection set as evacuation failed/pinned instead of only doing this work once in the pre evacuation phase.
> 
> As for testing, it is extremely hard to induce a situation where there is a pinned region with no apparent live objects in an optional collection set, so I gave up and just added the original test again.
> 
> Testing: gha, test
> 
> Thanks,
>   Thomas

Thomas Schatzl has updated the pull request incrementally with one additional commit since the last revision:

  * improved test case, covering wrong reclamation of "empty" pinned regions for
    * full gc
    * young gc (in young gen), initial evacuation
    * remark pause

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/24147/files
  - new: https://git.openjdk.org/jdk/pull/24147/files/aa5d8256..10ca8700

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=24147&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24147&range=01-02

  Stats: 16 lines in 1 file changed: 8 ins; 2 del; 6 mod
  Patch: https://git.openjdk.org/jdk/pull/24147.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24147/head:pull/24147

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


More information about the hotspot-gc-dev mailing list