RFR: 8310829: guarantee(!HAS_PENDING_EXCEPTION) failed in ExceptionTranslation::doit [v4]
    Doug Simon 
    dnsimon at openjdk.org
       
    Wed Jun 28 07:22:05 UTC 2023
    
    
  
On Tue, 27 Jun 2023 23:08:22 GMT, Tom Rodriguez <never at openjdk.org> wrote:
>> Doug Simon has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   revert to lazy loading of VMSupport
>
> src/hotspot/share/jvmci/jvmciEnv.cpp line 402:
> 
>> 400:       }
>> 401:       int res = encode(THREAD, buffer, buffer_size);
>> 402:       if (_from_env != nullptr && !_from_env->is_hotspot() && _from_env->has_pending_exception()) {
> 
> Why is this check before the `HAS_PENDING_EXCEPTION` check?  Couldn't you end up returning with a pending exception in this path?
If `encode` is `SharedLibraryToHotSpotExceptionTranslation::encode` there is no possibility of a pending HotSpot exception upon it returning. If it's `HotSpotToSharedLibraryExceptionTranslation::encode` then `_from_env->is_hotspot()` is `true` and so this `if` branch is not taken.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14641#discussion_r1244794019
    
    
More information about the graal-dev
mailing list