Blame SOURCES/8044762-pr2960.patch

8f84c8
# HG changeset patch
8f84c8
# User dsamersoff
8f84c8
# Date 1403087398 25200
8f84c8
#      Wed Jun 18 03:29:58 2014 -0700
8f84c8
# Node ID 13411144d46b50d0087f35eca2b8e827aae558f1
8f84c8
# Parent  10c9f8461c297a200ef57970c1f4c32d4081d790
8f84c8
8044762, PR2960: com/sun/jdi/OptionTest.java test time out
8f84c8
Summary: gdata could be NULL in debugInit_exit
8f84c8
Reviewed-by: dcubed
8f84c8
8f84c8
diff -r 10c9f8461c29 -r 13411144d46b src/share/back/debugInit.c
8f84c8
--- openjdk/jdk/src/share/back/debugInit.c	Fri May 20 19:42:05 2016 +0100
8f84c8
+++ openjdk/jdk/src/share/back/debugInit.c	Wed Jun 18 03:29:58 2014 -0700
8f84c8
@@ -1307,22 +1307,26 @@
8f84c8
     if ( error != JVMTI_ERROR_NONE ) {
8f84c8
         exit_code = 1;
8f84c8
         if ( docoredump ) {
8f84c8
+            LOG_MISC(("Dumping core as requested by command line"));
8f84c8
             finish_logging(exit_code);
8f84c8
             abort();
8f84c8
         }
8f84c8
     }
8f84c8
+
8f84c8
     if ( msg==NULL ) {
8f84c8
         msg = "";
8f84c8
     }
8f84c8
 
8f84c8
     LOG_MISC(("Exiting with error %s(%d): %s", jvmtiErrorText(error), error, msg));
8f84c8
 
8f84c8
-    gdata->vmDead = JNI_TRUE;
8f84c8
+    if (gdata != NULL) {
8f84c8
+        gdata->vmDead = JNI_TRUE;
8f84c8
 
8f84c8
-    /* Let's try and cleanup the JVMTI, if we even have one */
8f84c8
-    if ( gdata->jvmti != NULL ) {
8f84c8
-        /* Dispose of jvmti (gdata->jvmti becomes NULL) */
8f84c8
-        disposeEnvironment(gdata->jvmti);
8f84c8
+        /* Let's try and cleanup the JVMTI, if we even have one */
8f84c8
+        if ( gdata->jvmti != NULL ) {
8f84c8
+            /* Dispose of jvmti (gdata->jvmti becomes NULL) */
8f84c8
+            disposeEnvironment(gdata->jvmti);
8f84c8
+        }
8f84c8
     }
8f84c8
 
8f84c8
     /* Finish up logging. We reach here if JDWP is doing the exiting. */