On Wed, 14 Jul 2021 00:24:38 GMT, David Holmes <dhol...@openjdk.org> wrote:

>> Jorn Vernee has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Assert frame is correct type in frame_data_for_frame
>
> src/hotspot/share/prims/universalUpcallHandler.cpp line 86:
> 
>> 84:   context->new_handles = JNIHandleBlock::allocate_block(thread);
>> 85: 
>> 86:   // After this, we are official in Java Code. This needs to be done 
>> before we change any of the thread local
> 
> typo: s/official/officially/
> (I see this was copied from Javacalls)

Thanks, I wasn't sure whether to leave the comments in or not.

> src/hotspot/share/prims/universalUpcallHandler.cpp line 114:
> 
>> 112:   thread->set_active_handles(context->new_handles);     // install new 
>> handle block and reset Java frame linkage
>> 113: 
>> 114:   assert (thread->thread_state() != _thread_in_native, "cannot set 
>> native pc to NULL");
> 
> You transitioned to _thread_in_Java above so how can you possibly have 
> changed state again ?? (okay again copied from javaCalls ...)

Yeah, it seemed paranoid to me as well. I'll remove this

> src/hotspot/share/prims/universalUpcallHandler.cpp line 121:
> 
>> 119:   }
>> 120: 
>> 121:   MACOS_AARCH64_ONLY(thread->enable_wx(WXExec));
> 
> Not clear why this is needed? JavaCallWrapper doesn't use it.

I took this from JavaCallWrapper. Seems to have been added in 17 for the mach 
aarch64 port: 
https://github.com/openjdk/jdk17/blame/a32d2eefea12771522b942b32985df0fe50119e8/src/hotspot/share/runtime/javaCalls.cpp#L112

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

PR: https://git.openjdk.java.net/jdk17/pull/149

Reply via email to