# HG changeset patch # User dsamersoff # Date 1403087398 25200 # Wed Jun 18 03:29:58 2014 -0700 # Node ID c11f0fe0800d6cd51094f452d0dd72ce6dbfc9b9 # Parent b35dbc80ab6173c6fe1b4b6fa9c4ccab837cb478 8044762: com/sun/jdi/OptionTest.java test time out Summary: gdata could be NULL in debugInit_exit Reviewed-by: dcubed diff --git a/src/share/back/debugInit.c b/src/share/back/debugInit.c --- a/src/share/back/debugInit.c +++ b/src/share/back/debugInit.c @@ -1307,22 +1307,26 @@ 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)); - gdata->vmDead = JNI_TRUE; + 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); + /* 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. */