On Fri, 6 Feb 2026 20:27:36 GMT, Frederic Parain <[email protected]> wrote:
>> src/hotspot/share/ci/ciArray.cpp line 76:
>>
>>> 74: JavaThread* THREAD = CompilerThread::current();
>>> 75: oop elem = flatary->obj_at(index, THREAD);
>>> 76: if (HAS_PENDING_EXCEPTION) {
>>
>> This is odd. The compiler cannot create exceptions because it can't call
>> Java code (nor can it allocate?). Should this be CATCH instead?
>
> The calls to element_value_impl() are guarded by VM_ENTRY_MARK, so this code
> is executed when the CompilerThread is _in_vm.
> In case of a pending exception, the code clears the exception and returns an
> invalid constant, delegating the handling of the situation to the caller,
> which is free to opt for a different approach or to simply bail out.
> This behavior was discussed with the compiler team.
Ok, thanks.
-------------
PR Review Comment:
https://git.openjdk.org/valhalla/pull/2033#discussion_r2789819977