summaryrefslogtreecommitdiff
path: root/reclaim.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2022-01-12 10:52:46 +0300
committerIvan Maidanski <ivmai@mail.ru>2022-01-12 16:24:32 +0300
commit9d4e1525fc6528b549e8c7f9c396e492d7eceec7 (patch)
tree61875b332238e1634f490bd0758c2373c40980c2 /reclaim.c
parent488eb0a8aa3f17a9a6e5b0ced681fe3261435485 (diff)
downloadbdwgc-9d4e1525fc6528b549e8c7f9c396e492d7eceec7.tar.gz
Eliminate division-by-zero FP warning in GC_ASSERT in reclaim_block
* reclaim.c [PARALLEL_MARK] (GC_reclaim_block): Assert sz is not zero (before HBLKSIZE/sz).
Diffstat (limited to 'reclaim.c')
-rw-r--r--reclaim.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/reclaim.c b/reclaim.c
index fe907fed..b67d6bd4 100644
--- a/reclaim.c
+++ b/reclaim.c
@@ -438,7 +438,7 @@ STATIC void GC_reclaim_block(struct hblk *hbp, word report_if_found)
/* Here we assume two markers, but this is extremely */
/* unlikely to fail spuriously with more. And if it does, it */
/* should be looked at. */
- GC_ASSERT(hhdr -> hb_n_marks <= 2 * (HBLKSIZE/sz + 1) + 16);
+ GC_ASSERT(sz != 0 && hhdr->hb_n_marks <= 2 * (HBLKSIZE/sz + 1) + 16);
# else
GC_ASSERT(sz * hhdr -> hb_n_marks <= HBLKSIZE);
# endif