RFR: 8308745: ObjArrayKlass::allocate_objArray_klass may call into java while holding a lock
Dean Long
dlong at openjdk.org
Thu Mar 7 00:22:56 UTC 2024
On Tue, 6 Feb 2024 22:59:04 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
> This change creates a new sort of native recursive lock that can be held during JNI and Java calls, which can be used for synchronization while creating objArrayKlasses at runtime.
>
> Passes tier1-7.
src/hotspot/share/oops/arrayKlass.cpp line 135:
> 133: ResourceMark rm(THREAD);
> 134: {
> 135: // Ensure atomic creation of higher dimensions
Isn't this comment still useful?
src/hotspot/share/oops/arrayKlass.cpp line 144:
> 142: ObjArrayKlass* ak =
> 143: ObjArrayKlass::allocate_objArray_klass(class_loader_data(), dim + 1, this, CHECK_NULL);
> 144: ak->set_lower_dimension(this);
Would it be useful to assert that the lower dimension has been set?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17739#discussion_r1515322667
PR Review Comment: https://git.openjdk.org/jdk/pull/17739#discussion_r1515323404
More information about the hotspot-dev
mailing list