> 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).

Timofei has updated the pull request incrementally with two additional commits 
since the last revision:

 - Add regression test for FollowReferences
 - Delete unreachable code

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/32253/files
  - new: https://git.openjdk.org/jdk/pull/32253/files/eb706611..385133c8

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

  Stats: 105 lines in 3 files changed: 102 ins; 3 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/32253.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/32253/head:pull/32253

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

Reply via email to