Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mono/metadata/sgen-los.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/mono/metadata/sgen-los.c b/mono/metadata/sgen-los.c
index ca4aaebbadf..f8b1b25f9c4 100644
--- a/mono/metadata/sgen-los.c
+++ b/mono/metadata/sgen-los.c
@@ -548,10 +548,16 @@ sgen_los_scan_card_table (gboolean mod_union, SgenGrayQueue *queue)
LOSObject *obj;
for (obj = los_object_list; obj; obj = obj->next) {
- guint8 *cards = NULL;
+ guint8 *cards;
+
+ if (!SGEN_OBJECT_HAS_REFERENCES (obj->data))
+ continue;
+
if (mod_union) {
cards = obj->cardtable_mod_union;
g_assert (cards);
+ } else {
+ cards = NULL;
}
sgen_cardtable_scan_object (obj->data, obj->size, cards, mod_union, queue);
@@ -564,6 +570,8 @@ sgen_los_update_cardtable_mod_union (void)
LOSObject *obj;
for (obj = los_object_list; obj; obj = obj->next) {
+ if (!SGEN_OBJECT_HAS_REFERENCES (obj->data))
+ continue;
obj->cardtable_mod_union = sgen_card_table_update_mod_union (obj->cardtable_mod_union,
obj->data, obj->size, NULL);
}