summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2023-05-12 07:38:38 +0300
committerIvan Maidanski <ivmai@mail.ru>2023-05-12 10:39:11 +0300
commita0a416a8a9c5ad98678207ef8fa3a9b8e1262318 (patch)
treefa5e31552479ae3df1e40590f3578bc617a87949
parentdb76b2f831a66c8067626dd6bb68450243989bf3 (diff)
downloadbdwgc-a0a416a8a9c5ad98678207ef8fa3a9b8e1262318.tar.gz
Fix assertion in GC_mark_from regarding GC_least_plausible_heap_addr
(fix of commit b21b53a35) * mark.c (GC_mark_from): Allow current_p (p->mse_start) plus descr to be equal to GC_least_plausible_heap_addr in assertion; add comment.
-rw-r--r--mark.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/mark.c b/mark.c
index 72146d86..b0fe1802 100644
--- a/mark.c
+++ b/mark.c
@@ -614,13 +614,14 @@ GC_INNER mse * GC_mark_from(mse *mark_stack_top, mse *mark_stack,
GC_STATIC_ASSERT(GC_DS_TAGS == 0x3);
switch (tag) {
case GC_DS_LENGTH:
- /* Large length. */
- /* Process part of the range to avoid pushing too much on the */
- /* stack. */
+ /* Large length. Process part of the range to avoid pushing */
+ /* too much on the stack. */
+
+ /* Either it is a heap object or a region outside the heap. */
GC_ASSERT(descr <= (word)GC_greatest_plausible_heap_addr
- (word)GC_least_plausible_heap_addr
|| (word)(current_p + descr)
- < (word)GC_least_plausible_heap_addr
+ <= (word)GC_least_plausible_heap_addr
|| (word)current_p >= (word)GC_greatest_plausible_heap_addr);
# ifdef PARALLEL_MARK
# define SHARE_BYTES 2048
@@ -932,7 +933,7 @@ STATIC mse * GC_steal_mark_stack(mse * low, mse * high, mse * local,
|| descr <= (word)GC_greatest_plausible_heap_addr
- (word)GC_least_plausible_heap_addr
|| (word)(p -> mse_start + descr)
- < (word)GC_least_plausible_heap_addr
+ <= (word)GC_least_plausible_heap_addr
|| (word)p -> mse_start
>= (word)GC_greatest_plausible_heap_addr);
/* If this is a big object, count it as size/256 + 1 objects. */