RFR: 8360664: Null pointer dereference in src/hotspot/share/prims/jvmtiTagMap.cpp in IterateOverHeapObjectClosure::do_object() [v2]

Artem Semenov asemenov at openjdk.org
Fri Jun 27 12:08:43 UTC 2025


On Fri, 27 Jun 2025 05:22:00 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:

> > At most I would add an assert, but generally my understanding is that the user of any closure has the responsibility of passing it valid input.
> 
> Adding asserts sounds like a good suggestion.

It seems to me that this won’t be a big problem in this form. I’ve just moved the existing check higher up, where it will prevent dereferencing a null pointer.

However, if you confirm that this is not acceptable, I will replace the check with assert.

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

PR Comment: https://git.openjdk.org/jdk/pull/26002#issuecomment-3012790447


More information about the hotspot-dev mailing list