[lworld] RFR: 8335545: [lworld] JNI MonitorEnter doesn't throw the right exception
Coleen Phillimore
coleenp at openjdk.org
Tue Jul 9 20:13:29 UTC 2024
On Tue, 9 Jul 2024 20:05:23 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> Fix JNI's MonitorEnter to throw IdentityException instead of IllegalMonitorStateException.
>
> src/hotspot/share/runtime/synchronizer.cpp line 315:
>
>> 313: const char* className = obj->klass()->external_name(); \
>> 314: size_t msglen = strlen(desc) + strlen(className) + 1; \
>> 315: char* message = NEW_RESOURCE_ARRAY(char, msglen); \
>
> If NEW_RESOURCE_ARRAY fails, it will call vm_exit_out_of_memory, so no need to check for nullptr.
Do you need EnableValhalla ?
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1160#discussion_r1671174445
More information about the valhalla-dev
mailing list