From 18f363d0bcf8c9fa3f6eb7b9119b2715caf3a3da Mon Sep 17 00:00:00 2001 From: vsc Date: Wed, 11 Oct 2006 17:24:36 +0000 Subject: [PATCH] make sure we only follow pointers *before* we removed the respective code block, ie don't kill the child before checking pointers from parent! git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1704 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- C/cdmgr.c | 9 +++++++-- changes-5.1.html | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/C/cdmgr.c b/C/cdmgr.c index 14fe009e6..b64126eba 100644 --- a/C/cdmgr.c +++ b/C/cdmgr.c @@ -11,8 +11,12 @@ * File: cdmgr.c * * comments: Code manager * * * -* Last rev: $Date: 2006-10-11 15:08:03 $,$Author: vsc $ * +* Last rev: $Date: 2006-10-11 17:24:36 $,$Author: vsc $ * * $Log: not supported by cvs2svn $ +* Revision 1.194 2006/10/11 15:08:03 vsc +* fix bb entries +* comment development code for timestamp overflow. +* * Revision 1.193 2006/10/11 14:53:57 vsc * fix memory leak * fix overflow handling @@ -1102,7 +1106,6 @@ kill_off_lu_block(LogUpdIndex *c, LogUpdIndex *parent, PredEntry *ap) { /* first, make sure that I killed off all my children, some children may remain in case I have tables as children */ - decrease_log_indices(c, (yamop *)&(ap->cs.p_code.ExpandCode)); if (parent != NULL) { /* sat bye bye */ /* decrease refs */ @@ -1165,6 +1168,7 @@ kill_first_log_iblock(LogUpdIndex *c, LogUpdIndex *parent, PredEntry *ap) RemoveMainIndex(ap); } } + decrease_log_indices(c, (yamop *)&(ap->cs.p_code.ExpandCode)); /* make sure that a child cannot remove us */ kill_children(c, ap); /* check if we are still the main index */ @@ -1248,6 +1252,7 @@ Yap_ErLogUpdIndex(LogUpdIndex *clau) { if (clau->ClFlags & ErasedMask) { if (!clau->ClRefCount) { + decrease_log_indices(clau, (yamop *)&(clau->ClPred->cs.p_code.ExpandCode)); if (clau->ClFlags & SwitchRootMask) { kill_off_lu_block(clau, NULL, clau->ClPred); } else { diff --git a/changes-5.1.html b/changes-5.1.html index cf0ff2975..8d531e6fd 100644 --- a/changes-5.1.html +++ b/changes-5.1.html @@ -16,6 +16,7 @@

Yap-5.1.2: