[Nestmates] RFR: 8192889: [Nestmates] ciField constructor needs to clear nestmate related exceptions

David Holmes david.holmes at oracle.com
Fri Dec 1 09:35:29 UTC 2017


Sorry copy'n'paste error (and fixed synopsis)

On 1/12/2017 7:29 PM, David Holmes wrote:
> Bug: https://bugs.openjdk.java.net/browse/JDK-8192889
> webrev: https://bugs.openjdk.java.net/browse/JDK-8192889

webrev: http://cr.openjdk.java.net/~dholmes/8192889/webrev/

David

> Xcomp testing exposed another issue with the compiler thread.
> 
> In ciField::ciField(ciInstanceKlass* klass, int index) we have:
> 
>    // Access check based on declared_holder. canonical_holder should not 
> be used
>    // to check access because it can erroneously succeed. If this check 
> fails,
>    // propagate the declared holder to will_link() which in turn will 
> bail out
>    // compilation for this field access.
>    if (!Reflection::verify_field_access(klass->get_Klass(), 
> declared_holder->get_Klass(), canonical_holder, 
> field_desc.access_flags(), true)) {
>      _holder = declared_holder;
>      _offset = -1;
>      _is_constant = false;
>     return;
>    }
> 
> However if the access check failed because a nestmate access check 
> encountered an exception, the pending exception will trigger an 
> ExceptionMark entry failure in later processing. We need to clear the 
> exception before returning.
> 
> Thanks,
> David



More information about the valhalla-dev mailing list