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

InstanceKlass::can_be_verified_at_dumptime() returns opposite value

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 17
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b27

      Backports

        Description

        (InstanceKlass::can_be_verified_at_dumptime(k) == true) IFF (k and all of its supertypes have major_version >= 50)

        However, currently this function returns the opposite value.

        The fix is:

        --- a/src/hotspot/share/oops/instanceKlass.cpp
        +++ b/src/hotspot/share/oops/instanceKlass.cpp
         // Verification of archived old classes will be performed during run time.
         bool InstanceKlass::can_be_verified_at_dumptime() const {
           if (major_version() < 50 /*JAVA_6_VERSION*/) {
        - return true;
        + return false;
           }
        - if (java_super() != NULL && java_super()->can_be_verified_at_dumptime()) {
        - return true;
        + if (java_super() != NULL && !java_super()->can_be_verified_at_dumptime()) {
        + return false;
           }
           Array<InstanceKlass*>* interfaces = local_interfaces();
           int len = interfaces->length();
           for (int i = 0; i < len; i++) {
        - if (interfaces->at(i)->can_be_verified_at_dumptime()) {
        - return true;
        + if (!interfaces->at(i)->can_be_verified_at_dumptime()) {
        + return false;
             }
           }
        - return false;
        + return true;
         }

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                ccheung Calvin Cheung
                Reporter:
                iklam Ioi Lam
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: