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

InstanceKlass::can_be_verified_at_dumptime() returns opposite value

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 17
    • None
    • hotspot
    • b27

        (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;
         }

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

                Created:
                Updated:
                Resolved: