6753795: HotSpot crash in strlen() when JVMTI is used
authornever
Tue, 30 Sep 2008 11:56:01 -0700
changeset 1403 3be05c51cf44
parent 1402 ccb40ce62b79
child 1404 4a969f79e3e6
6753795: HotSpot crash in strlen() when JVMTI is used Summary: test for null instead of strlen Reviewed-by: rasbold
hotspot/src/share/vm/prims/jvmtiEnvBase.cpp
--- a/hotspot/src/share/vm/prims/jvmtiEnvBase.cpp	Thu Sep 25 12:50:51 2008 -0700
+++ b/hotspot/src/share/vm/prims/jvmtiEnvBase.cpp	Tue Sep 30 11:56:01 2008 -0700
@@ -121,7 +121,7 @@
   JvmtiEventController::env_initialize((JvmtiEnv*)this);
 
 #ifdef JVMTI_TRACE
-  _jvmti_external.functions = strlen(TraceJVMTI)? &jvmtiTrace_Interface : &jvmti_Interface;
+  _jvmti_external.functions = TraceJVMTI != NULL ? &jvmtiTrace_Interface : &jvmti_Interface;
 #else
   _jvmti_external.functions = &jvmti_Interface;
 #endif