diff --git a/C/dbase.c b/C/dbase.c index 80f2183ca..cd50d8e9b 100644 --- a/C/dbase.c +++ b/C/dbase.c @@ -3917,7 +3917,8 @@ p_eraseall(void) if (!pe->cs.p_code.NOfClauses) return TRUE; - Yap_RemoveIndexation(pe); + if (pe->PredFlags & IndexedPredFlag) + Yap_RemoveIndexation(pe); cl = ClauseCodeToLogUpdClause(pe->cs.p_code.FirstClause); do { LogUpdClause *ncl = cl->ClNext; diff --git a/C/index.c b/C/index.c index 7972b55a9..dbb42135c 100644 --- a/C/index.c +++ b/C/index.c @@ -4726,7 +4726,6 @@ replace_lu_block(LogUpdIndex *blk, int flag, PredEntry *ap, yamop *code, int has i = 0; } codep = cp_lu_trychain(codep, ocodep, blk->ClCode, flag, ap, code, has_cut, ncl, ncls, i); - if (codep > (char *)ncl+sz) exit(1); /* the copying has been done */ start->u.Ill.l2 = codep; /* insert ourselves into chain */ @@ -5378,7 +5377,8 @@ Yap_AddClauseToIndex(PredEntry *ap, yamop *beg, int first) { int cb; if (!(ap->PredFlags & LogUpdatePredFlag)) { - Yap_RemoveIndexation(ap); + if (ap->PredFlags & IndexedPredFlag) + Yap_RemoveIndexation(ap); return; } if ((cb = setjmp(Yap_CompilerBotch)) == 3) { diff --git a/C/tracer.c b/C/tracer.c index 62064db07..382449fbf 100644 --- a/C/tracer.c +++ b/C/tracer.c @@ -115,9 +115,9 @@ low_level_trace(yap_low_level_port port, PredEntry *pred, CELL *args) vsc_count++; #ifdef COMMENTED if (vsc_count < 123536430LL) { - if (vsc_count == 123536441LL) vsc_xstop = 1; return; } + if (vsc_count == 123536441LL) vsc_xstop = 1; if (vsc_count < 5530257LL) { return; }