[sgen] Fix mod union consistency check
authorVlad Brezae <brezaevlad@gmail.com>
Tue, 6 Sep 2016 16:57:48 +0000 (19:57 +0300)
committerVlad Brezae <brezaevlad@gmail.com>
Tue, 6 Sep 2016 16:59:24 +0000 (19:59 +0300)
We don't need a mod union to mark an object with concurrent mark&sweep.

mono/sgen/sgen-debug.c

index a643fec6654d4cd6198cee777a73b165b4440fbd..43237fdfacbaf75b80c52f1d6bb1264ca0943128 100644 (file)
@@ -216,7 +216,7 @@ is_major_or_los_object_marked (GCObject *obj)
 #undef HANDLE_PTR
 #define HANDLE_PTR(ptr,obj)    do {    \
        if (*(ptr) && !sgen_ptr_in_nursery ((char*)*(ptr)) && !is_major_or_los_object_marked ((GCObject*)*(ptr))) { \
-               if (!sgen_get_remset ()->find_address_with_cards (start, cards, (char*)(ptr))) { \
+               if (!cards || !sgen_get_remset ()->find_address_with_cards (start, cards, (char*)(ptr))) { \
                        GCVTable __vt = SGEN_LOAD_VTABLE (obj); \
                        SGEN_LOG (0, "major->major reference %p at offset %zd in object %p (%s.%s) not found in remsets.", *(ptr), (char*)(ptr) - (char*)(obj), (obj), sgen_client_vtable_get_namespace (__vt), sgen_client_vtable_get_name (__vt)); \
                        binary_protocol_missing_remset ((obj), __vt, (int) ((char*)(ptr) - (char*)(obj)), *(ptr), (gpointer)LOAD_VTABLE(*(ptr)), object_is_pinned (*(ptr))); \
@@ -243,8 +243,6 @@ check_mod_union_callback (GCObject *obj, size_t size, void *dummy)
        else
                cards = sgen_get_major_collector ()->get_cardtable_mod_union_for_reference (start);
 
-       SGEN_ASSERT (0, cards, "we must have mod union for marked major objects");
-
 #include "sgen-scan-object.h"
 }