diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2022-01-12 10:52:46 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2022-01-12 16:24:32 +0300 |
commit | 9d4e1525fc6528b549e8c7f9c396e492d7eceec7 (patch) | |
tree | 61875b332238e1634f490bd0758c2373c40980c2 /reclaim.c | |
parent | 488eb0a8aa3f17a9a6e5b0ced681fe3261435485 (diff) | |
download | bdwgc-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |