On Fri, 7 Aug 2026 11:01:58 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.
> 
> Fix the typo by changing klass to k in the null check.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Thank you for catching this typo. It looks good. Could you add a simple 
regression test, please?
You can look at the folder `test/hotspot/jtreg/serviceability/jvmti` to see 
some examples.

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

PR Review: https://git.openjdk.org/jdk/pull/32253#pullrequestreview-4888352578

Reply via email to