8162945: HotspotDiagnosticMXBean getFlags erroneously reports OutOfMemory
authormgronlun
Tue, 02 Aug 2016 18:36:47 +0200
changeset 40203 6ecf77479dcf
parent 40202 ce2b94b9d36b
child 40204 2781da09d28f
child 40395 93a899c03875
8162945: HotspotDiagnosticMXBean getFlags erroneously reports OutOfMemory Reviewed-by: egahlin, dcubed
jdk/src/jdk.management/share/native/libmanagement_ext/Flag.c
--- a/jdk/src/jdk.management/share/native/libmanagement_ext/Flag.c	Mon Aug 01 14:09:27 2016 +0000
+++ b/jdk/src/jdk.management/share/native/libmanagement_ext/Flag.c	Tue Aug 02 18:36:47 2016 +0200
@@ -142,7 +142,7 @@
             continue;
         }
 
-        if (valueObj == NULL) {
+        if (valueObj == NULL && globals[i].type != JMM_VMGLOBAL_TYPE_JSTRING) {
             free(globals);
             JNU_ThrowOutOfMemoryError(env, 0);
             return 0;