]> granicus.if.org Git - gc/commitdiff
Fix assertion violation in GC_mark_from prefetch loop
authorIvan Maidanski <ivmai@mail.ru>
Wed, 17 Jul 2013 06:07:19 +0000 (10:07 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Sat, 20 Jul 2013 13:58:15 +0000 (17:58 +0400)
* mark.c (GC_mark_from): If "descr" is less than size of word then
skip prefetching and PUSH_CONTENTS of the current entry (thus,
eliminate assertion violation in the prefetch loop) if SMALL_CONFIG is
not defined.

mark.c

diff --git a/mark.c b/mark.c
index 58eb44b9cdec233addbdb489986b4f94b522a16c..d47f4550e56cf866f31d1df1ec24cd65b431a929 100644 (file)
--- a/mark.c
+++ b/mark.c
@@ -788,6 +788,10 @@ GC_INNER mse * GC_mark_from(mse *mark_stack_top, mse *mark_stack,
       }
     } else /* Small object with length descriptor */ {
       mark_stack_top--;
+#     ifndef SMALL_CONFIG
+        if (descr < sizeof(word))
+          continue;
+#     endif
       limit = current_p + (word)descr;
     }
 #   ifdef ENABLE_TRACE