RFR: 8310874: Runthese30m crashes with klass should be in the placeholders during verification
David Holmes
dholmes at openjdk.org
Fri Sep 15 00:20:42 UTC 2023
On Fri, 15 Sep 2023 00:07:10 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> For non-parallel capable class loaders, the class is not put in the placeholders table, so a verification at the wrong time will hit this assert. This change removes the invalid assert.
>> While studying this code, we also noticed that if an error occurs during class loading after the klass is put in the LoaderConstraints table but before adding to the dictionary, we weren't removing the klass from the LoaderConstraints table. This change also fixes this.
>> Tested with inserting a LoaderConstraintTable::verify while running jck tests. Also tested with failure insertion after the addClass() call to throw OutOfMemoryError. Also tested with tier1-4.
>
> src/hotspot/share/classfile/loaderConstraints.cpp line 453:
>
>> 451: LoaderConstraint *p = find_loader_constraint(name, loader);
>> 452: if (p != nullptr && p->klass() != nullptr && p->klass() == klass) {
>> 453: log_info(class, loader, constraints)("removing klass %s failed to load", name->as_C_string());
>
> Suggestion, either:
>
> "removing klass %s: failed to load"
>
> or
>
> "removing klass %s as it failed to load"
Actually "failed to load" seems rather vague here, the actual condition is much more specific isn't it?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15752#discussion_r1326643234
More information about the hotspot-runtime-dev
mailing list