< prev index next >

src/share/back/debugInit.c

Print this page
rev 11541 : 8044762: com/sun/jdi/OptionTest.java test time out
Summary: gdata could be NULL in debugInit_exit
Reviewed-by: dcubed

@@ -1305,27 +1305,31 @@
 
     /* Pick an error code */
     if ( error != JVMTI_ERROR_NONE ) {
         exit_code = 1;
         if ( docoredump ) {
+            LOG_MISC(("Dumping core as requested by command line"));
             finish_logging(exit_code);
             abort();
         }
     }
+
     if ( msg==NULL ) {
         msg = "";
     }
 
     LOG_MISC(("Exiting with error %s(%d): %s", jvmtiErrorText(error), error, msg));
 
+    if (gdata != NULL) {
     gdata->vmDead = JNI_TRUE;
 
     /* Let's try and cleanup the JVMTI, if we even have one */
     if ( gdata->jvmti != NULL ) {
         /* Dispose of jvmti (gdata->jvmti becomes NULL) */
         disposeEnvironment(gdata->jvmti);
     }
+    }
 
     /* Finish up logging. We reach here if JDWP is doing the exiting. */
     finish_logging(exit_code);  /* Only first call matters */
 
     /* Let's give the JNI a FatalError if non-exit 0, which is historic way */
< prev index next >