summaryrefslogtreecommitdiff
path: root/malloc.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2023-04-08 15:42:27 +0300
committerIvan Maidanski <ivmai@mail.ru>2023-04-09 10:55:49 +0300
commitb21b53a356f332005db090c6a9a4e0d17322c935 (patch)
tree0572fe1dd38eb61c159951cb6ccaa2e28df7af15 /malloc.c
parent2da23516ce16f603b716586dcb21db5b03784626 (diff)
downloadbdwgc-b21b53a356f332005db090c6a9a4e0d17322c935.tar.gz
Refine comparisons to GC_greatest_plausible_heap_addr
GC_greatest_plausible_heap_addr should always be greater (strictly) than any address of a heap object. * backgraph.c (add_back_edges): Check that pointer is strictly less than GC_greatest_plausible_heap_addr (instead of less or equal). * dbg_mlc.c [KEEP_BACK_PTRS && ALIGNMENT==1] (GC_get_back_ptr_info): Likewise. * include/gc/gc_mark.h (GC_MARK_AND_PUSH): Likewise. * malloc.c (GC_malloc_kind_global): Likewise. * typd_mlc.c (GC_typed_mark_proc): Likewise. * include/gc/gc_mark.h (GC_greatest_plausible_heap_addr): Refine comment (that any object address is strictly less). * mark.c (GC_mark_from): Allow descr in assertions to be equal to GC_greatest_plausible_heap_addr-GC_least_plausible_heap_addr; reformat comment.
Diffstat (limited to 'malloc.c')
-rw-r--r--malloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/malloc.c b/malloc.c
index 6a24da89..61d2061a 100644
--- a/malloc.c
+++ b/malloc.c
@@ -297,7 +297,7 @@ GC_API GC_ATTR_MALLOC void * GC_CALL GC_malloc_kind_global(size_t lb, int k)
} else {
GC_ASSERT(0 == obj_link(op)
|| ((word)obj_link(op)
- <= (word)GC_greatest_plausible_heap_addr
+ < (word)GC_greatest_plausible_heap_addr
&& (word)obj_link(op)
>= (word)GC_least_plausible_heap_addr));
*opp = obj_link(op);