RFR: 8302491: NoClassDefFoundError omits the original cause of an error [v3]
Coleen Phillimore
coleenp at openjdk.org
Tue Feb 21 15:09:30 UTC 2023
On Wed, 15 Feb 2023 00:45:31 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> Ilarion Nakonechnyy has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Get rid of redundant code -
>> merge get_cause_with_stack_trace and get_cause_simple
>> - Review corrections
>
> src/hotspot/share/oops/instanceKlass.cpp line 987:
>
>> 985: // Retry with the simple method
>> 986: cause = java_lang_Throwable::get_cause_simple(exception, THREAD);
>> 987: CLEAR_PENDING_EXCEPTION;
>
> Reverse this: clear the pending exception first.
So you could handle the case where the stack trace throws an OOM or SOE in the get_cause() function and not have the second call here.
-------------
PR: https://git.openjdk.org/jdk/pull/12566
More information about the hotspot-dev
mailing list