Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8274379

Allow process of unsafe access errors in check_special_condition_for_native_trans

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 18
    • 18
    • hotspot
    • b19

      Today we special case unsafe access errors from other async exceptions in that we don't process them when transitioning from native back to Java. Code comments in check_special_condition_for_native_trans() mention that unsafe access errors should not be handled since that may block while creating the exception. That should not be an issue since we can always make sure we call process_if_requested_with_exit_check() after the call to throw_unsafe_access_internal_error() to process any pending operations not already handled in a ThreadBlockInVM wrapper (today that only means suspend requests and object reallocation operations).

      By removing this special treatment we can also simplify the async support API a bit. Member _async_exception_condition for example would not be really needed anymore. That field is needed today to be able to identify an unsafe access error condition when checking for async exceptions since we cannot check the _has_async_exception bit in the _suspend_flags because we don't set it for these cases (to avoid noticing them in the native wrappers).

            pchilanomate Patricio Chilano Mateo
            pchilanomate Patricio Chilano Mateo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: