RFR: 8302491: NoClassDefFoundError omits the original cause of an error [v2]
Ilarion Nakonechnyy
inakonechnyy at openjdk.org
Mon Feb 20 12:16:37 UTC 2023
On Wed, 15 Feb 2023 03:14:12 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Ilarion Nakonechnyy has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - Address review notes
>> - Correct the jtreg test -
>> check stacktrace only for NoClassDefFoundError
>
> So if I understand correctly the scenario is:
>
> 1. During execution of clinit of class C a StackOverflowError is thrown.
> 2. The VM sees the exception and creates the NoClassDefFoundError for C
> 3. The VM calls `get_cause_with_stack_trace` to get the original SOE but that triggers a secondary SOE.
> 4. The VM ignores the secondary SOE and the NCDFE is created without a cause.
>
> The fix is to retry step 3 avoiding the Java upcall and so avoiding a secondary SOE.
>
> Is that right?
>
> A few nits/suggestions below.
>
> Thanks
@dholmes-ora Yes, you described the scenario correctly.
-------------
PR: https://git.openjdk.org/jdk/pull/12566
More information about the hotspot-dev
mailing list