You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by gs...@apache.org on 2006/11/09 21:21:35 UTC
svn commit: r473059 - in /incubator/harmony/enhanced/drlvm/trunk/vm/vmcore:
include/version_svn_tag.h src/jvmti/jvmti_property.cpp
Author: gshimansky
Date: Thu Nov 9 12:21:34 2006
New Revision: 473059
URL: http://svn.apache.org/viewvc?view=rev&rev=473059
Log:
Applied HARMONY-2120 [drlvm][jvmti] Fix null pointer error in AddToBootstrapClassLoaderSearch()
Tests passed on gentoo linux and windows XP
Modified:
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/include/version_svn_tag.h
incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_property.cpp
Modified: incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/include/version_svn_tag.h
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/include/version_svn_tag.h?view=diff&rev=473059&r1=473058&r2=473059
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/include/version_svn_tag.h (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/include/version_svn_tag.h Thu Nov 9 12:21:34 2006
@@ -18,6 +18,6 @@
#ifndef _VERSION_SVN_TAG_
#define _VERSION_SVN_TAG_
-#define VERSION_SVN_TAG "472847"
+#define VERSION_SVN_TAG "473012"
#endif // _VERSION_SVN_TAG_
Modified: incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_property.cpp
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_property.cpp?view=diff&rev=473059&r1=473058&r2=473059
==============================================================================
--- incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_property.cpp (original)
+++ incubator/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_property.cpp Thu Nov 9 12:21:34 2006
@@ -80,17 +80,27 @@
reinterpret_cast<PropertiesHandle>(properties),
"vm.boot.class.path");
- // create new bootclasspath
- size_t len_bcp = strlen(bcp_prop);
- size_t len_seg = strlen(segment);
- char *new_bcp = (char *)STD_ALLOCA( len_bcp + len_seg + 2);
- memcpy(new_bcp, bcp_prop, len_bcp);
- char *end = new_bcp + len_bcp;
- *end = PORT_PATH_SEPARATOR;
- memcpy(end + 1, segment, len_seg + 1);
+ size_t len_bcp = 0;
- // update bootclasspath property
- add_pair_to_properties(*properties, "vm.boot.class.path", new_bcp);
+ if (bcp_prop != NULL) {
+ len_bcp = strlen(bcp_prop);
+ }
+
+ if (len_bcp != 0) {
+ // create new bootclasspath
+ char* new_bcp = (char*) STD_ALLOCA(len_bcp + 1 + strlen(segment) + 1);
+ strcpy(new_bcp, bcp_prop);
+ new_bcp[len_bcp] = PORT_PATH_SEPARATOR;
+ strcpy(new_bcp + len_bcp + 1, segment);
+
+ // update bootclasspath property
+ add_pair_to_properties(*properties, "vm.boot.class.path", new_bcp);
+
+ STD_FREE(new_bcp);
+ } else {
+ // update bootclasspath property
+ add_pair_to_properties(*properties, "vm.boot.class.path", segment);
+ }
return JVMTI_ERROR_NONE;
}