RFR: 8293295: Add type check asserts to java_lang_ref_Reference accessors

Stefan Karlsson stefank at openjdk.org
Fri Sep 2 07:58:45 UTC 2022


On Fri, 2 Sep 2022 07:37:16 GMT, Axel Boldt-Christmas <aboldtch at openjdk.org> wrote:

> From a discussion in [JDK-8293207](https://bugs.openjdk.org/browse/JDK-8293207) / #10117 it was brought up that the Weak/Soft and Phantom specific accessor in java_lang_ref_Reference does not assert that the type is valid.
> Options

Given that "!is_phantom" returns true for FinalReferences, maybe we should change this to explicitly check if the ref is Weak or Soft?

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

Changes requested by stefank (Reviewer).

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


More information about the hotspot-runtime-dev mailing list