SUGGESTED FIX
> hg diff management.cpp
diff --git a/src/share/vm/services/management.cpp b/src/share/vm/services/management.cpp
--- a/src/share/vm/services/management.cpp
+++ b/src/share/vm/services/management.cpp
@@ -1537,7 +1537,6 @@ bool add_global_entry(JNIEnv* env, Handl
global->type = JMM_VMGLOBAL_TYPE_JSTRING;
} else {
global->type = JMM_VMGLOBAL_TYPE_UNKNOWN;
- assert(false, "Unsupported VMGlobal Type");
return false;
}
> hg diff Flag.c
diff --git a/src/share/native/sun/management/Flag.c b/src/share/native/sun/management/Flag.c
--- a/src/share/native/sun/management/Flag.c
+++ b/src/share/native/sun/management/Flag.c
@@ -133,11 +133,8 @@ Java_sun_management_Flag_getFlags
globals[i].value.j);
break;
default:
- // unsupported type
- sprintf(errmsg, "Unsupported VMGlobal Type %d", globals[i].type);
- JNU_ThrowInternalError(env, errmsg);
- free(globals);
- return 0;
+ // ignore unsupported type
+ continue;
}
switch (globals[i].origin) {
case JMM_VMGLOBAL_ORIGIN_DEFAULT:
|
EVALUATION
6631166 added a new vm argument type that triggers the assertion. This assertion causes the nightly M&M tests to fail.
Adding a new vm argument type in M&M requires a synchronized change in hotspot and jdk. On the other hand, the fix for 6898160 (hotspot) will filter VM flags of the unsupported type and 6924497 (jdk) will ignore VM flags of name==NULL (i.e. flags filtered by the VM).
We should decouple the jdk and hotspot dependency further so that a new type can be added in VM and this VM can run with an older version of jdk (i.e. jdk6 and later). Specially, the jdk should ignore flags of unsupported types and unknown types from the VM. The VM should remove the assert.
|