RFR: 8268406: Deallocate jmethodID native memory [v10]

Erik Österlund eosterlund at openjdk.org
Tue Jun 24 14:48:34 UTC 2025


On Tue, 24 Jun 2025 02:36:14 GMT, David Holmes <dholmes at openjdk.org> wrote:

> the `cls` parameter is never actually used. So while it is supposed to refer to the class you have the static method jMethodID for, there is no requirement that it actually does, and could even be null.

Not passing in the cls parameter, would be a clear user error though, right? And one that would have crashed before, because if you racingly execute bytecodes of a class that is being unloaded, things would blow up one way or another. To me it seems like the user should just pass in the class as intended and then all is good.

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

PR Comment: https://git.openjdk.org/jdk/pull/25267#issuecomment-3000808219


More information about the hotspot-dev mailing list