RFR: 8365604: Null pointer dereference in src/hotspot/share/adlc/output_h.cpp ArchDesc::declareClasses() [v2]

Andrew Dinn adinn at openjdk.org
Thu Aug 21 12:11:53 UTC 2025


On Thu, 21 Aug 2025 11:09:12 GMT, Artem Semenov <asemenov at openjdk.org> wrote:

> Moreover, pos_idx is also not being checked

I don't know what you mean by this comment. `pos_idx` is being checked in the loop test before the call to `head->next()` in that same test.

The important question you need to address is why and what that check guarantees. I say you need to address it because you are the one claiming that there is a possible nullptr dereference  here without any evidence that it has occurred in practice. If that is based on a correct analysis of the code then you need to explain how we can arrive at a situtation where we hit a null pointer that takes into account the logic of the loop test. So far you have not done so.

n.b. I am not claiming there is no possibility of a nullptr dereference here (although I can form my own opinion). I'm asking you to tell me why I should take your claim that it is possible seriously. Your answers so far are not convincing me that you have understood how this code works.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26798#discussion_r2290852355


More information about the hotspot-jfr-dev mailing list