RFR: 8281771: Crash in java_lang_invoke_MethodType::print_signature

Aleksey Shipilev shade at openjdk.java.net
Tue Feb 15 07:14:12 UTC 2022


On Tue, 15 Feb 2022 06:43:02 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:

> The crash happens in java.lang.invoke.MethodType.<init> when VM tries to print this objec while rtype and ptypes are not initialized yet. So the fix is just to check if they are not NULL.

Missed the spot?

src/hotspot/share/classfile/javaClasses.cpp line 4100:

> 4098:   oop rt = rtype(mt);
> 4099:   if (rt != NULL) {
> 4100:     java_lang_Class::print_signature(rtype(mt), st);

Suggestion:

    java_lang_Class::print_signature(rt, st);

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

Changes requested by shade (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/7470


More information about the hotspot-runtime-dev mailing list