Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8268833 | 18 | Calvin Cheung | P3 | Resolved | Fixed | b02 |
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;
}
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
- backported by
-
JDK-8268833 InstanceKlass::can_be_verified_at_dumptime() returns opposite value
-
- Resolved
-
- relates to
-
JDK-8267431 Rename InstanceKlass::has_old_class_version to can_be_verified_at_dumptime
-
- Resolved
-