OpenJDK / jdk / jdk10
changeset 26924:8b20f1c5af93
8054194: jstack crash: assert(handle != NULL) failed: JNI handle should not be null
Summary: Add better error check to sa to avoid secondary crash
Reviewed-by: sla, jbachorik, sspitsyn
author | dsamersoff |
---|---|
date | Thu, 25 Sep 2014 02:48:25 -0700 |
parents | 60c1555c25c5 |
children | 0e8a2ce8817a |
files | hotspot/agent/src/os/win32/windbg/sawindbg.cpp |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/hotspot/agent/src/os/win32/windbg/sawindbg.cpp Mon Sep 22 18:34:35 2014 +0400 +++ b/hotspot/agent/src/os/win32/windbg/sawindbg.cpp Thu Sep 25 02:48:25 2014 -0700 @@ -318,12 +318,18 @@ path = (jstring) env->GetStaticObjectField(clazz, imagePath_ID); CHECK_EXCEPTION_(false); + if (path == NULL) { + THROW_NEW_DEBUGGER_EXCEPTION_("Windbg Error: not able to get imagePath field ID!", false); + } buf = env->GetStringUTFChars(path, &isCopy); CHECK_EXCEPTION_(false); AutoJavaString imagePath(env, path, buf); path = (jstring) env->GetStaticObjectField(clazz, symbolPath_ID); CHECK_EXCEPTION_(false); + if (path == NULL) { + THROW_NEW_DEBUGGER_EXCEPTION_("Windbg Error: not able to get symbolPath field ID!", false); + } buf = env->GetStringUTFChars(path, &isCopy); CHECK_EXCEPTION_(false); AutoJavaString symbolPath(env, path, buf);