JDK-8253472 : Hotspot code should special case ScopedAccessError
  • Type: Enhancement
  • Component: tools
  • Sub-Component: jextract
  • Affected Version: repo-panama
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-09-22
  • Updated: 2020-09-22
  • Resolved: 2020-09-22
Related Reports
Relates :  
Description
In a recent change, this function was introduced:

void ThreadShadow::clear_pending_nonasync_exception() {
  // Do not clear probable async exceptions.
  if (!_pending_exception->is_a(SystemDictionary::ThreadDeath_klass()) &&
       _pending_exception->klass() !=       (_pending_exception->klass() != SystemDictionary::InternalError_klass() ||
       java_lang_InternalError::during_unsafe_access(_pending_exception) != JNI_TRUE)) {
    clear_pending_exception();
  }
}

This code should be enhanced to also test for the new ScopedAccessError async exception, so that this is not accidentally cleared.