From 7f9f10a1d9ec9b02d3c91c2188b9c54c820c0fb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa=20II?= Date: Thu, 22 Apr 2010 12:08:02 +0100 Subject: [PATCH] cannot trust H0 in the att test (use Yap_GlobalBase instead). --- C/heapgc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/C/heapgc.c b/C/heapgc.c index 1751709a8..b41b5adab 100644 --- a/C/heapgc.c +++ b/C/heapgc.c @@ -1173,7 +1173,7 @@ mark_variable(CELL_PTR current) next = GET_NEXT(ccur); if (IsVarTerm(ccur)) { - if (IN_BETWEEN(H0,current,H) && IsAttVar(current) && current==next) { + if (IN_BETWEEN(Yap_GlobalBase,current,H) && IsAttVar(current) && current==next) { if (next < H0) POP_CONTINUATION(); if (!UNMARKED_MARK(next-1,local_bp)) { total_marked++; @@ -1682,7 +1682,7 @@ mark_trail(tr_fr_ptr trail_ptr, tr_fr_ptr trail_base, CELL *gc_H, choiceptr gc_B } else if (IsPairTerm(trail_cell)) { /* can safely ignore this */ CELL *cptr = RepPair(trail_cell); - if (IN_BETWEEN(H0,cptr,H) && + if (IN_BETWEEN(Yap_GlobalBase,cptr,H) && IsAttVar(cptr)) { TrailTerm(trail_base) = (CELL)cptr; mark_external_reference(&TrailTerm(trail_base)); @@ -2465,7 +2465,7 @@ sweep_trail(choiceptr gc_B, tr_fr_ptr old_TR) CELL *pt0 = RepPair(trail_cell); CELL flags; - if (IN_BETWEEN(H0, pt0, H) && IsAttVar(pt0)) { + if (IN_BETWEEN(Yap_GlobalBase, pt0, H) && IsAttVar(pt0)) { TrailTerm(dest) = trail_cell; /* be careful with partial gc */ if (HEAP_PTR(TrailTerm(dest))) {