[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-hotspot-runtime-dev
Subject:    Re: RFR: 8274379: Allow process of unsafe access errors in check_special_condition_for_native_trans
From:       Robbin Ehn <rehn () openjdk ! java ! net>
Date:       2021-09-30 12:16:34
Message-ID: RLGIqKD0_Tow7TZi2bJQRS98qJLiCrW80z2-yl4Hr2Q=.cd6da1cf-dc34-4fd5-b313-b0725ca7ce4e () github ! com
[Download RAW message or body]

On Tue, 28 Sep 2021 17:23:29 GMT, Patricio Chilano Mateo <pchilanomate@openjdk.org> \
wrote:

> Hi,
> 
> 
> Please review the following patch to allow processing of unsafe access errors in \
> check_special_condition_for_native_trans(). 
> 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 because that may block while creating the exception. But 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 for unsafe access errors we can also simplify \
> the async exception support API. For instance we can remove \
> _async_exception_condition and simplify some of the supporting methods. I also \
> removed the _thread_in_native case from the switch statement in \
> check_and_handle_async_exceptions() since we never call that method in that state. 
> Testing by running tiers1-6 in mach5. 
> 
> Thanks,
> Patricio

Marked as reviewed by rehn (Reviewer).

Hi @pchilano,

Yes this seem like an improvement, so process_if_requested_with_exit_check is the \
only place were we handle async exceptions. (except JNI) It looks good, but I have I \
really hard time looking at the diff/code to determine if this behaves differently in \
any bad ways. I trust you have done the testing needed to be sure.

Thanks, Robbin

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

PR: https://git.openjdk.java.net/jdk/pull/5741


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic