harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From odea...@apache.org
Subject svn commit: r812533 - /harmony/enhanced/jdktools/branches/java6/modules/jpda/src/main/native/jdwp/common/agent/core/RequestModifier.cpp
Date Tue, 08 Sep 2009 14:44:14 GMT
Author: odeakin
Date: Tue Sep  8 14:44:14 2009
New Revision: 812533

URL: http://svn.apache.org/viewvc?rev=812533&view=rev
Log:
Apply partial fix for HARMONY-6305 ([jdktools][jdwp] Unexpected VM_DEATH events running JDWP
tests in Java 6 branch) - when replacing . with / make sure we are not altering the original
pattern, as this affects subsequent pattern matches.

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

Modified: harmony/enhanced/jdktools/branches/java6/modules/jpda/src/main/native/jdwp/common/agent/core/RequestModifier.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/jdktools/branches/java6/modules/jpda/src/main/native/jdwp/common/agent/core/RequestModifier.cpp?rev=812533&r1=812532&r2=812533&view=diff
==============================================================================
--- harmony/enhanced/jdktools/branches/java6/modules/jpda/src/main/native/jdwp/common/agent/core/RequestModifier.cpp
(original)
+++ harmony/enhanced/jdktools/branches/java6/modules/jpda/src/main/native/jdwp/common/agent/core/RequestModifier.cpp
Tue Sep  8 14:44:14 2009
@@ -77,14 +77,19 @@
             bool result =  MatchPatternSourceName(sourceFileName, m_pattern);
 
             if(!result) {
+                bool result;
+                char *p = (char*) GetMemoryManager().Allocate(strlen(m_pattern)+1 JDWP_FILE_LINE);
+                strcpy(p, m_pattern);
                 // replace '.' with '/' to be matched with signature
-                for (char* p = m_pattern; *p != '\0'; p++) {
+                for (; *p != '\0'; p++) {
                     if (*p == '.') {
                         *p = '/';
                     }
                 }
                 JDWP_ASSERT(eInfo.signature != 0);
-                return MatchPattern(eInfo.signature, m_pattern);
+                result = MatchPattern(eInfo.signature, p);
+                GetMemoryManager().Free(p JDWP_FILE_LINE);
+                return result;
             } else {
                 return true;
             }



Mime
View raw message