harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From regi...@apache.org
Subject svn commit: r797398 - /harmony/enhanced/jdktools/branches/java6/modules/jpda/src/main/native/jdwp/common/agent/commands/ArrayReference.cpp
Date Fri, 24 Jul 2009 09:52:15 GMT
Author: regisxu
Date: Fri Jul 24 09:52:15 2009
New Revision: 797398

URL: http://svn.apache.org/viewvc?rev=797398&view=rev
Log:
Apply patch for HARMONY-6285: [JDWP][Java6] Fix a bug in Execute method of GetValuesHandler
that might result in crash

Modified:
    harmony/enhanced/jdktools/branches/java6/modules/jpda/src/main/native/jdwp/common/agent/commands/ArrayReference.cpp

Modified: harmony/enhanced/jdktools/branches/java6/modules/jpda/src/main/native/jdwp/common/agent/commands/ArrayReference.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/branches/java6/modules/jpda/src/main/native/jdwp/common/agent/commands/ArrayReference.cpp?rev=797398&r1=797397&r2=797398&view=diff
==============================================================================
--- harmony/enhanced/jdktools/branches/java6/modules/jpda/src/main/native/jdwp/common/agent/commands/ArrayReference.cpp
(original)
+++ harmony/enhanced/jdktools/branches/java6/modules/jpda/src/main/native/jdwp/common/agent/commands/ArrayReference.cpp
Fri Jul 24 09:52:15 2009
@@ -77,8 +77,15 @@
 
     JDWP_TRACE(LOG_RELEASE, (LOG_DATA_FL, "GetValues: received: arrayID=%p, firstIndex=%d,
length=%d", arrayObject, firstIndex, length));
 
+    if (NULL == arrayObject) {
+        JDWP_TRACE(LOG_RELEASE, (LOG_DATA_FL, "GetValues: ReadArrayID() returned NULL"));
+        AgentException aex = GetExceptionManager().GetLastException();
+        jdwpError err = aex.ErrCode();
+        JDWP_SET_EXCEPTION(aex);
+        return err;
+    }
+
     jclass arrObjClass = jni->GetObjectClass(arrayObject);
-    JDWP_ASSERT(arrObjClass != 0);
 
     char* signature = 0;
     jvmtiError err;



Mime
View raw message