On Wed, 29 Oct 2025 06:02:57 GMT, David Holmes <[email protected]> wrote:

>> Patricio Chilano Mateo has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   add const to references
>
> src/hotspot/share/runtime/javaCalls.cpp line 61:
> 
>> 59:   assert(!thread->owns_locks(), "must release all locks when leaving 
>> VM");
>> 60:   guarantee(thread->can_call_java(), "cannot make java calls from the 
>> native compiler");
>> 61:   assert(!thread->preempting(), "");
> 
> I'm not sure why this is checked here, and there is no error message to tell 
> me. If we did get here with `preempting` set what would that mean?

This is a safety check since a thread marked as preempted should not be making 
upcalls to Java. It should be bailing out from methods and returning to the VM 
entry point. I found we could get here from the exception path (from your other 
comment below) when there was no `NoPreemptMark` there.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27802#discussion_r2475389912

Reply via email to