On Fri, 14 Aug 2026 08:13:16 GMT, Timofei <[email protected]> wrote: >> FollowReferences function has unreachable code. The null check was >> incorrectly applied to the klass variable inside a block where klass is >> already guaranteed to be non-null. Because of this, the check was always >> false, and the extracted internal Klass* pointer (k) was left unchecked, >> which could lead to a null pointer dereference. >> >> Since k_mirror is checked for null and primitive types earlier in the >> function, java_lang_Class::as_Klass(k_mirror) is guaranteed to return a >> non-null Klass* pointer. Therefore, the typo'd dead code is removed and >> replaced with an assert to uphold this invariant. >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Timofei has updated the pull request incrementally with two additional > commits since the last revision: > > - Add assert in place of the unreachable code in JvmtiEnv::FollowReferences > - Delete regression test
Okay. ------------- Marked as reviewed by dholmes (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/32253#pullrequestreview-4966638274
