From: Ivan Maidanski Date: Wed, 7 Nov 2018 20:01:31 +0000 (+0300) Subject: Add comment about hbp overflow in GC_install_counts X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=36a6d79e182861a70c53a604e36bb34a8bad7bd1;p=gc Add comment about hbp overflow in GC_install_counts (fix of commit 6a32bb4) Issue #245 (bdwgc). * headers.c (GC_install_counts): Better comment for the case of overflow. --- diff --git a/headers.c b/headers.c index 8267872d..462da89f 100644 --- a/headers.c +++ b/headers.c @@ -285,7 +285,7 @@ GC_INNER GC_bool GC_install_counts(struct hblk *h, size_t sz/* bytes */) for (hbp = h; (word)hbp < (word)h + sz; hbp += BOTTOM_SZ) { if (!get_index((word) hbp)) return(FALSE); if ((word)hbp > (~(word)0) - (word)BOTTOM_SZ * HBLKSIZE) - break; /* overflow */ + break; /* overflow of hbp+=BOTTOM_SZ is expected */ } if (!get_index((word)h + sz - 1)) return(FALSE); for (hbp = h + 1; (word)hbp < (word)h + sz; hbp += 1) {