On Wed, 10 Jul 2024 05:46:31 GMT, David Holmes <dhol...@openjdk.org> wrote:

>> 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?

Though I see this is inconsistent with `Exceptions::_throw_msg_cause`

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

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

Reply via email to