RFR: 8369021: A crash in ConstantPool::klass_at_impl [v2]
Jan Kratochvil
jkratochvil at openjdk.org
Fri Oct 10 21:10:02 UTC 2025
On Fri, 10 Oct 2025 05:38:07 GMT, David Holmes <dholmes at openjdk.org> wrote:
> * We are looking up `outer_k->constants->klass_at(x)` where `x` could be the inner-class index or the outher-class index (can't tell which from the bug report)
It crashes with caller on the line `Klass* i = cp->klass_at(ioff, CHECK);` so `x` is the inner-class index.
`klass_at_impl` has already successfully returned `Klass*` for the outer-class index that time.
> * `klass_at_impl` does ` Handle loader (THREAD, this_cp->pool_holder()->class_loader());`, which is the same as `outer_k->class_loader()`
`klass_at_impl` is that time running for `inner_k`.
> src/hotspot/share/oops/instanceKlass.cpp line 3332:
>
>> 3330: if (nullptr == outer_klass) return nullptr;
>> 3331:
>> 3332: // Wait until also outer_klass gets fully loaded.
>
> How are you "waiting"?
I expected the line `ObjectLocker ol(h_init_lock, THREAD);` is the waiting. But this patch is not verified with the customer so maybe (or now probably?) it does not work.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27595#issuecomment-3392307478
PR Review Comment: https://git.openjdk.org/jdk/pull/27595#discussion_r2422088410
More information about the hotspot-dev
mailing list