[Nestmates] RFR: 8192889: [Nestmates] ciField constructor needs to clear nest-host related exceptions

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

Bug: https://bugs.openjdk.java.net/browse/JDK-8192889
webrev: https://bugs.openjdk.java.net/browse/JDK-8192889

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 
   // 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;

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.


More information about the valhalla-dev mailing list