changes to get pass specJBB validation
authorbdemsky <bdemsky>
Sun, 3 Apr 2011 06:23:47 +0000 (06:23 +0000)
committerbdemsky <bdemsky>
Sun, 3 Apr 2011 06:23:47 +0000 (06:23 +0000)
Robust/src/Runtime/runtime.c

index 6974b896af3a46ceeacbbdf1e5e9fdd982541061..7adccfe40c50614920c37a353f01556aa53fc92f 100644 (file)
@@ -293,8 +293,10 @@ void arraycopy(struct ___Object___ *src, int srcPos, struct ___Object___ *dst, i
   int srctype=((int *)src)[0];
 
   //not an array or type mismatch
-  if (dsttype<NUMCLASSES||srctype<NUMCLASSES||srctype!=dsttype)
+  if (dsttype<NUMCLASSES||srctype<NUMCLASSES)
     return;
+  if (srctype!=dsttype)
+    printf("Potential type mismatch in arraycopy\n");
 
   struct ArrayObject *aodst=(struct ArrayObject *)dst;
   struct ArrayObject *aosrc=(struct ArrayObject *)src;
@@ -319,7 +321,6 @@ void arraycopy(struct ___Object___ *src, int srcPos, struct ___Object___ *dst, i
     int i;
     for(i=0;i<length;i++) {
       struct ___Object___ * ptr=((struct ___Object___**)(((char*) &aosrc->___length___)+sizeof(int)))[i+srcPos];
-      int ptrtype=((int *)ptr)[0];
       //hit an object
       ((struct ___Object___ **)(((char*) &aodst->___length___)+sizeof(int)))[i+destPos]=ptr;
     }