RFR: 8335553: [Graal] Compiler thread calls into jdk.internal.vm.VMSupport.decodeAndThrowThrowable and crashes in OOM situation [v2]

David Holmes dholmes at openjdk.org
Wed Jul 10 05:51:16 UTC 2024


On Mon, 8 Jul 2024 19:09:47 GMT, Doug Simon <dnsimon at openjdk.org> wrote:

>> Doug Simon has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   fixed TestTranslatedException
>
> src/hotspot/share/utilities/exceptions.cpp line 208:
> 
>> 206:                               Handle h_loader, Handle h_protection_domain) {
>> 207:   // Check for special boot-strapping/compiler-thread handling
>> 208:   if (special_exception(thread, file, line, h_cause)) return;
> 
> This fixes a long standing bug where `special_exception` is being queried with the *cause* of the exception being thrown instead of the *name* of the exception being thrown.

I'm not so sure this is in fact a bug. If we are throwing with a cause, but we can't actually throw and so will do vm_exit, then the exception of interest is the cause not the more generic exception that would otherwise contain the cause.

Though I have to wonder why there is not an original `_throw` for the "cause" exception, that would have triggered the special_exception handling anyway?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20083#discussion_r1671652583


More information about the core-libs-dev mailing list