RFR: 8302491: NoClassDefFoundError omits the original cause of an error
Ilarion Nakonechnyy
inakonechnyy at openjdk.org
Wed Feb 15 01:42:48 UTC 2023
On Wed, 15 Feb 2023 00:46:23 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> The proposed approach added a new function for getting the cause of an exception -`java_lang_Throwable::get_cause_simple `, that gets called within `InstanceKlass::add_initialization_error` if an old one `java_lang_Throwable::get_cause_with_stack_trace` didn't succeed because of an exception during the VM call. The simple function doesn't call the VM for getting a stack trace but fills in any other information about an exception.
>>
>> Besides that, the discovering information about an exception was added to `ConstantPoolCacheEntry::save_and_throw_indy_exc` function.
>>
>> Jtreg for reproducing the issue also was added to the commit.
>> The commit was tested with tier1 tests.
>
> test/hotspot/jtreg/runtime/ClassInitErrors/TestNoClassDefFoundCause.java line 26:
>
>> 24: /**
>> 25: * @test
>> 26: * @bug 1234567
>
> Fix the bug number.
> Do you need a @requires to run with -Xcomp?
Do you propose to use something like
`@requires vm.compMode != "Xint"`
-------------
PR: https://git.openjdk.org/jdk/pull/12566
More information about the hotspot-dev
mailing list