RFR: 8272096: Exceptions::new_exception can return wrong exception [v3]

Coleen Phillimore coleenp at openjdk.org
Tue Jul 19 14:44:55 UTC 2022


On Mon, 18 Jul 2022 05:15:42 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   second get_user_name_slow call should CHECK_NULL too.
>
> src/hotspot/share/utilities/exceptions.cpp line 361:
> 
>> 359:       thread->clear_pending_exception();
>> 360:       ResourceMark rm(thread);
>> 361:       assert(incoming_exception.is_null(), "Pending exception while throwing %s %s", name->as_C_string(), message);
> 
> You may as well leave this as `false`

Having the condition there seems nicer when you get the assert than false when I was testing it.  I wish there was a version of fatal that wasn't product mode.

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

PR: https://git.openjdk.org/jdk/pull/9492


More information about the hotspot-dev mailing list