From: Ivan Maidanski Date: Thu, 19 Jan 2017 07:45:22 +0000 (+0300) Subject: Add assertion to allocobj that live unmarked object cannot be reclaimed X-Git-Tag: v8.0.0~951 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2c5aebcdb4773dbf11ef0502acce16fab7f15712;p=platform%2Fupstream%2Flibgc.git Add assertion to allocobj that live unmarked object cannot be reclaimed * alloc.c (GC_allocobj): Add assertion before GC_continue_reclaim call that either GC_is_full_gc is FALSE or the corresponding ok_reclaim_list element is NULL (i.e. GC_continue_reclaim call is a no-op). --- diff --git a/alloc.c b/alloc.c index 0db6458..ebbfb3e 100644 --- a/alloc.c +++ b/alloc.c @@ -1426,6 +1426,9 @@ GC_INNER ptr_t GC_allocobj(size_t gran, int kind) /* Do our share of marking work */ if(TRUE_INCREMENTAL) GC_collect_a_little_inner(1); /* Sweep blocks for objects of this size */ + GC_ASSERT(!GC_is_full_gc + || NULL == GC_obj_kinds[kind].ok_reclaim_list + || NULL == GC_obj_kinds[kind].ok_reclaim_list[gran]); GC_continue_reclaim(gran, kind); EXIT_GC(); if (*flh == 0) {