From 736ab397cf4019038c77bc9528a488773a4d47ba Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Sat, 19 Aug 2017 18:22:37 +0300 Subject: [PATCH] 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). --- mark.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.40.0