X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fsgen%2Fsgen-copy-object.h;h=925af17275dd67a1d2606d0c302b1ba3d7a4c38b;hb=6c62196f5cf46bb0ccf3c938a144cc0976ebd60e;hp=4c3eae0f09e3db3c7736872a54640a0565f722f0;hpb=b180e9de9cf15990e4d18b970546b5cb95918aad;p=mono.git diff --git a/mono/sgen/sgen-copy-object.h b/mono/sgen/sgen-copy-object.h index 4c3eae0f09e..925af17275d 100644 --- a/mono/sgen/sgen-copy-object.h +++ b/mono/sgen/sgen-copy-object.h @@ -1,5 +1,6 @@ -/* - * sgen-copy-object.h: This is where objects are copied. +/** + * \file + * This is where objects are copied. * * Copyright 2001-2003 Ximian, Inc * Copyright 2003-2010 Novell, Inc. @@ -123,6 +124,12 @@ copy_object_no_checks_par (GCObject *obj, SgenGrayQueue *queue) GRAY_OBJECT_ENQUEUE_PARALLEL (queue, (GCObject *)destination, sgen_vtable_get_descriptor (vt)); } } else { + /* + * Unlikely case. Clear the allocated object so it doesn't confuse nursery + * card table scanning, since it can contain old invalid refs. + * FIXME make sure it is not a problem if another threads scans it while we clear + */ + mono_gc_bzero_aligned (destination, objsize); destination = final_destination; } }