Integrated: 8330981: ZGC: Should not dedup strings in the finalizer graph

Erik Österlund eosterlund at openjdk.org
Fri May 31 12:53:07 UTC 2024


On Wed, 29 May 2024 07:18:24 GMT, Erik Österlund <eosterlund at openjdk.org> wrote:

> The generic logic we have for deduplicating strings during marking in various GCs, relies on creating a phantom root to store strings to be deduplicated. When storing an oop into a phantom root, it is required that the oop is strongly reachable at that point. However, when ZGC marks through finalizers (as opposed to the strongly reachable graph), the oop has not been marked as strongly reachable, and hence it isn't really safe to create that phantom root.
> 
> The solution is quite simple, really. Just don't deduplicate strings when marking through the finalizer graph.

This pull request has now been integrated.

Changeset: 2f2dc228
Author:    Erik Österlund <eosterlund at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/2f2dc2289bce47d8071a86215218f345cce71dba
Stats:     8 lines in 2 files changed: 4 ins; 0 del; 4 mod

8330981: ZGC: Should not dedup strings in the finalizer graph

Reviewed-by: stefank, aboldtch, tschatzl

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

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


More information about the hotspot-gc-dev mailing list