[Vm-dev] [commit][2738] Cog VM source as per VMMaker.oscog-eem.297.

commits at squeakvm.org commits at squeakvm.org
Mon Jun 10 20:59:51 UTC 2013


Revision: 2738
Author:   eliot
Date:     2013-06-10 13:59:49 -0700 (Mon, 10 Jun 2013)
Log Message:
-----------
Cog VM source as per VMMaker.oscog-eem.297.

Fix 3 (!!) bugs in primitiveDLSymInLibrary.

Modified Paths:
--------------
    branches/Cog/nscogsrc/plugins/VMProfileLinuxSupportPlugin/VMProfileLinuxSupportPlugin.c
    branches/Cog/src/plugins/VMProfileLinuxSupportPlugin/VMProfileLinuxSupportPlugin.c

Property Changed:
----------------
    branches/Cog/platforms/Cross/vm/sqSCCSVersion.h

Modified: branches/Cog/nscogsrc/plugins/VMProfileLinuxSupportPlugin/VMProfileLinuxSupportPlugin.c
===================================================================
--- branches/Cog/nscogsrc/plugins/VMProfileLinuxSupportPlugin/VMProfileLinuxSupportPlugin.c	2013-06-08 15:54:24 UTC (rev 2737)
+++ branches/Cog/nscogsrc/plugins/VMProfileLinuxSupportPlugin/VMProfileLinuxSupportPlugin.c	2013-06-10 20:59:49 UTC (rev 2738)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	VMPluginCodeGenerator VMMaker.oscog-eem.294 uuid: 9f0fd793-5a49-476d-9a76-c84180415334
+	VMPluginCodeGenerator VMMaker.oscog-eem.297 uuid: cb5c5783-9e64-4e06-ac22-1303b40171e9
    from
-	VMProfileLinuxSupportPlugin VMMaker.oscog-eem.294 uuid: 9f0fd793-5a49-476d-9a76-c84180415334
+	VMProfileLinuxSupportPlugin VMMaker.oscog-eem.297 uuid: cb5c5783-9e64-4e06-ac22-1303b40171e9
  */
-static char __buildInfo[] = "VMProfileLinuxSupportPlugin VMMaker.oscog-eem.294 uuid: 9f0fd793-5a49-476d-9a76-c84180415334 " __DATE__ ;
+static char __buildInfo[] = "VMProfileLinuxSupportPlugin VMMaker.oscog-eem.297 uuid: cb5c5783-9e64-4e06-ac22-1303b40171e9 " __DATE__ ;
 
 
 
@@ -74,7 +74,6 @@
 static sqInt (*methodReturnValue)(sqInt oop);
 static sqInt (*popRemappableOop)(void);
 static sqInt (*positive32BitIntegerFor)(sqInt integerValue);
-static unsigned long (*positiveMachineIntegerValueOf)(sqInt oop);
 static sqInt (*primitiveFailFor)(sqInt reasonCode);
 static sqInt (*pushRemappableOop)(sqInt oop);
 static sqInt (*stackValue)(sqInt offset);
@@ -91,7 +90,6 @@
 extern sqInt methodReturnValue(sqInt oop);
 extern sqInt popRemappableOop(void);
 extern sqInt positive32BitIntegerFor(sqInt integerValue);
-extern unsigned long positiveMachineIntegerValueOf(sqInt oop);
 extern sqInt primitiveFailFor(sqInt reasonCode);
 extern sqInt pushRemappableOop(sqInt oop);
 extern sqInt stackValue(sqInt offset);
@@ -103,9 +101,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"VMProfileLinuxSupportPlugin VMMaker.oscog-eem.294 (i)"
+	"VMProfileLinuxSupportPlugin VMMaker.oscog-eem.297 (i)"
 #else
-	"VMProfileLinuxSupportPlugin VMMaker.oscog-eem.294 (e)"
+	"VMProfileLinuxSupportPlugin VMMaker.oscog-eem.297 (e)"
 #endif
 ;
 static sqInt numModules;
@@ -176,6 +174,7 @@
 	sz = byteSizeOf(nameObj);
 	libName = malloc(sz + 1);
 	strncpy(libName, firstIndexableField(nameObj), sz);
+	libName[sz] = 0;
 	nameObj = stackValue(1);
 	if (!(isBytes(nameObj))) {
 		free(libName);
@@ -184,7 +183,8 @@
 	sz = byteSizeOf(nameObj);
 	symName = malloc(sz + 1);
 	strncpy(symName, firstIndexableField(nameObj), sz);
-	lib = dlopen(libName, RTLD_LAZY || RTLD_NODELETE);
+	symName[sz] = 0;
+	lib = dlopen(libName, RTLD_LAZY | RTLD_NODELETE);
 	if (!(lib)) {
 		free(libName);
 		free(symName);
@@ -199,7 +199,7 @@
 	if (!ok) {
 		return primitiveFailFor(PrimErrNotFound);
 	}
-	return methodReturnValue(positiveMachineIntegerValueOf(((unsigned long)addr)));
+	return methodReturnValue(positive32BitIntegerFor(((unsigned long)addr)));
 }
 
 
@@ -292,7 +292,6 @@
 		methodReturnValue = interpreterProxy->methodReturnValue;
 		popRemappableOop = interpreterProxy->popRemappableOop;
 		positive32BitIntegerFor = interpreterProxy->positive32BitIntegerFor;
-		positiveMachineIntegerValueOf = interpreterProxy->positiveMachineIntegerValueOf;
 		primitiveFailFor = interpreterProxy->primitiveFailFor;
 		pushRemappableOop = interpreterProxy->pushRemappableOop;
 		stackValue = interpreterProxy->stackValue;


Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
___________________________________________________________________
Modified: checkindate
   - Thu Jun  6 15:16:42 PDT 2013
   + Mon Jun 10 13:58:47 PDT 2013

Modified: branches/Cog/src/plugins/VMProfileLinuxSupportPlugin/VMProfileLinuxSupportPlugin.c
===================================================================
--- branches/Cog/src/plugins/VMProfileLinuxSupportPlugin/VMProfileLinuxSupportPlugin.c	2013-06-08 15:54:24 UTC (rev 2737)
+++ branches/Cog/src/plugins/VMProfileLinuxSupportPlugin/VMProfileLinuxSupportPlugin.c	2013-06-10 20:59:49 UTC (rev 2738)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	VMPluginCodeGenerator VMMaker.oscog-eem.294 uuid: 9f0fd793-5a49-476d-9a76-c84180415334
+	VMPluginCodeGenerator VMMaker.oscog-eem.297 uuid: cb5c5783-9e64-4e06-ac22-1303b40171e9
    from
-	VMProfileLinuxSupportPlugin VMMaker.oscog-eem.294 uuid: 9f0fd793-5a49-476d-9a76-c84180415334
+	VMProfileLinuxSupportPlugin VMMaker.oscog-eem.297 uuid: cb5c5783-9e64-4e06-ac22-1303b40171e9
  */
-static char __buildInfo[] = "VMProfileLinuxSupportPlugin VMMaker.oscog-eem.294 uuid: 9f0fd793-5a49-476d-9a76-c84180415334 " __DATE__ ;
+static char __buildInfo[] = "VMProfileLinuxSupportPlugin VMMaker.oscog-eem.297 uuid: cb5c5783-9e64-4e06-ac22-1303b40171e9 " __DATE__ ;
 
 
 
@@ -74,7 +74,6 @@
 static sqInt (*methodReturnValue)(sqInt oop);
 static sqInt (*popRemappableOop)(void);
 static sqInt (*positive32BitIntegerFor)(sqInt integerValue);
-static unsigned long (*positiveMachineIntegerValueOf)(sqInt oop);
 static sqInt (*primitiveFailFor)(sqInt reasonCode);
 static sqInt (*pushRemappableOop)(sqInt oop);
 static sqInt (*stackValue)(sqInt offset);
@@ -91,7 +90,6 @@
 extern sqInt methodReturnValue(sqInt oop);
 extern sqInt popRemappableOop(void);
 extern sqInt positive32BitIntegerFor(sqInt integerValue);
-extern unsigned long positiveMachineIntegerValueOf(sqInt oop);
 extern sqInt primitiveFailFor(sqInt reasonCode);
 extern sqInt pushRemappableOop(sqInt oop);
 extern sqInt stackValue(sqInt offset);
@@ -103,9 +101,9 @@
 struct VirtualMachine* interpreterProxy;
 static const char *moduleName =
 #ifdef SQUEAK_BUILTIN_PLUGIN
-	"VMProfileLinuxSupportPlugin VMMaker.oscog-eem.294 (i)"
+	"VMProfileLinuxSupportPlugin VMMaker.oscog-eem.297 (i)"
 #else
-	"VMProfileLinuxSupportPlugin VMMaker.oscog-eem.294 (e)"
+	"VMProfileLinuxSupportPlugin VMMaker.oscog-eem.297 (e)"
 #endif
 ;
 static sqInt numModules;
@@ -176,6 +174,7 @@
 	sz = byteSizeOf(nameObj);
 	libName = malloc(sz + 1);
 	strncpy(libName, firstIndexableField(nameObj), sz);
+	libName[sz] = 0;
 	nameObj = stackValue(1);
 	if (!(isBytes(nameObj))) {
 		free(libName);
@@ -184,7 +183,8 @@
 	sz = byteSizeOf(nameObj);
 	symName = malloc(sz + 1);
 	strncpy(symName, firstIndexableField(nameObj), sz);
-	lib = dlopen(libName, RTLD_LAZY || RTLD_NODELETE);
+	symName[sz] = 0;
+	lib = dlopen(libName, RTLD_LAZY | RTLD_NODELETE);
 	if (!(lib)) {
 		free(libName);
 		free(symName);
@@ -199,7 +199,7 @@
 	if (!ok) {
 		return primitiveFailFor(PrimErrNotFound);
 	}
-	return methodReturnValue(positiveMachineIntegerValueOf(((unsigned long)addr)));
+	return methodReturnValue(positive32BitIntegerFor(((unsigned long)addr)));
 }
 
 
@@ -292,7 +292,6 @@
 		methodReturnValue = interpreterProxy->methodReturnValue;
 		popRemappableOop = interpreterProxy->popRemappableOop;
 		positive32BitIntegerFor = interpreterProxy->positive32BitIntegerFor;
-		positiveMachineIntegerValueOf = interpreterProxy->positiveMachineIntegerValueOf;
 		primitiveFailFor = interpreterProxy->primitiveFailFor;
 		pushRemappableOop = interpreterProxy->pushRemappableOop;
 		stackValue = interpreterProxy->stackValue;



More information about the Vm-dev mailing list