]> 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>
Wed, 17 Jul 2013 06:07:19 +0000 (10:07 +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 53925b1362d4357bace41f9099bf8387a649a8d8..16ea2366cadef3a601afaea6ef8d834af4330ba1 100644 (file)
--- a/mark.c
+++ b/mark.c
@@ -778,6 +778,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