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

[Nestmates] ciField constructor needs to clear nestmate related exceptions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: repo-valhalla
    • Fix Version/s: repo-valhalla
    • Component/s: hotspot
    • Labels:

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            dholmes David Holmes
            Reporter:
            dholmes David Holmes
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: