RFR: 8306950: [REDO] JDK-8305252 make_method_handle_intrinsic may call java code under a lock [v5]

David Holmes dholmes at openjdk.org
Fri Apr 28 06:11:30 UTC 2023


On Thu, 27 Apr 2023 18:34:30 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> src/hotspot/share/classfile/systemDictionary.cpp line 1953:
>> 
>>> 1951:   {
>>> 1952:     MonitorLocker ml(THREAD, InvokeMethodIntrinsicTable_lock);
>>> 1953:     while (true) {
>> 
>> Given that you break out of this loop based on the state of `created`, it might be better to change the loop to `while(!created)`.
>
> I agree, that does look better.  Thanks!

No it doesn't! Sorry but there are two reasons for getting out of the loop - one involves a return and one involves the break - only putting one of those in the loop condition doesn't clarify anything IMO.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/13681#discussion_r1179959537


More information about the hotspot-runtime-dev mailing list