From: Ivan Maidanski Date: Sat, 19 Aug 2017 15:22:37 +0000 (+0300) Subject: Fix hb_n_marks underflow in clear_fl_marks if MARK_BIT_PER_OBJ X-Git-Tag: v7.6.2~89 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=736ab397cf4019038c77bc9528a488773a4d47ba;p=gc Fix hb_n_marks underflow in clear_fl_marks if MARK_BIT_PER_OBJ Issue #177 (bdwgc). * mark.c [MARK_BIT_PER_OBJ] (GC_set_hdr_marks): Set hhdr->hb_n_marks exactly to n_marks value (without a decrement by one). --- diff --git a/mark.c b/mark.c index 21b35d26..0c48e0a8 100644 --- a/mark.c +++ b/mark.c @@ -163,7 +163,7 @@ GC_INNER void GC_set_hdr_marks(hdr *hhdr) } # endif # ifdef MARK_BIT_PER_OBJ - hhdr -> hb_n_marks = n_marks - 1; + hhdr -> hb_n_marks = n_marks; # else hhdr -> hb_n_marks = HBLK_OBJS(sz); # endif