RFR: 8339725: Concurrent GC crashed due to GetMethodDeclaringClass [v2]

David Holmes dholmes at openjdk.org
Tue Sep 10 09:05:08 UTC 2024


On Tue, 10 Sep 2024 02:18:35 GMT, Liang Mao <lmao at openjdk.org> wrote:

> > Maybe I'm misunderstanding the test case but isn't it using a jMethodID for a class that may have been unloaded?
> 
> Yes.

Okay then that is a programming error not a VM error. It is up to the application to ensure that classes are kept alive if you have jMethodID's for them:

https://docs.oracle.com/en/java/javase/22/docs/specs/jni/design.html#accessing-fields-and-methods

any validation the VM attempts with jMethodId's (and field id's) is best-effort and not required.

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

PR Comment: https://git.openjdk.org/jdk/pull/20907#issuecomment-2340086448


More information about the hotspot-dev mailing list