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).
After several attempts to write a regression test, I realized that this part of code is unreachable, even if klass changed to k, because reaching that part k must to be nullptr and the result of is_primitive must to be false. So, I deleted this part and added a simple regression test for it. ------------- PR Comment: https://git.openjdk.org/jdk/pull/32253#issuecomment-5238061288
