From e4e991b33d953ce426f495be3b06ace429210ffc Mon Sep 17 00:00:00 2001 From: bdemsky <bdemsky> Date: Sun, 3 Apr 2011 06:23:47 +0000 Subject: [PATCH] changes to get pass specJBB validation --- Robust/src/Runtime/runtime.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Robust/src/Runtime/runtime.c b/Robust/src/Runtime/runtime.c index 6974b896..7adccfe4 100644 --- a/Robust/src/Runtime/runtime.c +++ b/Robust/src/Runtime/runtime.c @@ -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; } -- 2.34.1