get rid of references to freed code.
This commit is contained in:
@@ -1258,6 +1258,8 @@ cleanup_dangling_indices(yamop *ipc, yamop *beg, yamop *end, yamop *suspend_code
|
||||
case _switch_on_cons:
|
||||
case _if_cons:
|
||||
case _go_on_cons:
|
||||
/* make sure we don't leave dangling references to memory that is going to be removed */
|
||||
ipc->u.sssl.l = NULL;
|
||||
ipc = NEXTOP(ipc,sssl);
|
||||
break;
|
||||
case _op_fail:
|
||||
@@ -1272,12 +1274,6 @@ cleanup_dangling_indices(yamop *ipc, yamop *beg, yamop *end, yamop *suspend_code
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Yap_cleanup_dangling_indices(yamop *ipc, yamop *beg, yamop *end, yamop *sc)
|
||||
{
|
||||
cleanup_dangling_indices(ipc, beg, end, sc);
|
||||
}
|
||||
|
||||
static void
|
||||
decrease_log_indices(LogUpdIndex *c, yamop *suspend_code)
|
||||
{
|
||||
|
@@ -205,7 +205,6 @@ void STD_PROTO(Yap_IPred,(PredEntry *, UInt, yamop *));
|
||||
int STD_PROTO(Yap_addclause,(Term,yamop *,int,Term,Term*));
|
||||
void STD_PROTO(Yap_add_logupd_clause,(PredEntry *,LogUpdClause *,int));
|
||||
void STD_PROTO(Yap_kill_iblock,(ClauseUnion *,ClauseUnion *,PredEntry *));
|
||||
void STD_PROTO(Yap_cleanup_dangling_indices,(yamop *,yamop *,yamop *,yamop *));
|
||||
void STD_PROTO(Yap_EraseStaticClause,(StaticClause *, Term));
|
||||
ClauseUnion *STD_PROTO(Yap_find_owner_index,(yamop *, PredEntry *));
|
||||
|
||||
|
@@ -284,6 +284,9 @@ static void
|
||||
AdjustSwitchTable(op_numbers op, yamop *table, COUNT i)
|
||||
{
|
||||
CELL *startcode = (CELL *)table;
|
||||
/* in case the table is already gone */
|
||||
if (!table)
|
||||
return;
|
||||
switch (op) {
|
||||
case _switch_on_func:
|
||||
{
|
||||
|
Submodule packages/jpl updated: 73e4e086d0...29151b2fe6
Reference in New Issue
Block a user