]> granicus.if.org Git - gc/commitdiff
Add comment about hbp overflow in GC_install_counts
authorIvan Maidanski <ivmai@mail.ru>
Wed, 7 Nov 2018 20:01:31 +0000 (23:01 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 7 Nov 2018 20:02:42 +0000 (23:02 +0300)
(fix of commit 6a32bb4)

Issue #245 (bdwgc).

* headers.c (GC_install_counts): Better comment for the case of
overflow.

headers.c

index 8267872dd59f088eda074a0337c1e7eb1d68c01f..462da89f545f900cc73f73e5885e774d5765febf 100644 (file)
--- 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) {