This commit is contained in:
Vitor Santos Costa
2019-01-31 11:54:17 +00:00
parent f7ed109d1c
commit b71b4f6fca
8 changed files with 72 additions and 31 deletions

View File

@@ -2852,10 +2852,14 @@ static Int undefp_handler(USES_REGS1) { /* '$undefp_handler'(P,Mod) */
PredEntry *pe;
pe = Yap_get_pred(Deref(ARG1), Deref(ARG2), "undefined/1");
if (EndOfPAEntr(pe))
return false;
PELOCK(59, pe);
if (EndOfPAEntr(pe)) {
UndefCode = FAILCODE;
UNLOCKPE(59, pe);
return false;
}
if (pe->OpcodeOfPred == UNDEF_OPCODE) {
UndefCode = FAILCODE;
UNLOCKPE(59, pe);
return false;
}