[jdk16] RFR: 8259275: JRuby crashes while resolving invokedynamic instruction [v4]
Calvin Cheung
ccheung at openjdk.java.net
Tue Jan 12 17:01:00 UTC 2021
On Tue, 12 Jan 2021 08:17:53 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Calvin Cheung has updated the pull request incrementally with one additional commit since the last revision:
>>
>> update per comments from David H.
>
> src/hotspot/share/classfile/classListParser.cpp line 488:
>
>> 486: CLEAR_PENDING_EXCEPTION;
>> 487: } else {
>> 488: exit(1);
>
> We should never just use `exit()` - at a minimum `vm_exit()`. But we should not silently exit with no indication of what went wrong. I'm not sure of the call chain here but can't we just return and let higher layers do the same until we eventually hit a cleaner exit path that reports the exception?
>
> Edit: I see now that this code was moved from another location not introduced with this fix, but this still seems wrong to me.
For now, I think the logging in ClassListParser::resolve_indy should just by tty->print instead of using UL. This way, if the exit(1) is hit, there will be some information about the reason. Also, not too many users would enable -Xlog:cds+lambda=debug.
-------------
PR: https://git.openjdk.java.net/jdk16/pull/104
More information about the hotspot-runtime-dev
mailing list