improve signal handling.

This commit is contained in:
Vitor Santos Costa
2017-07-24 18:17:51 +01:00
parent 530d73c470
commit 22837d498b
5 changed files with 30 additions and 24 deletions

View File

@@ -1155,9 +1155,12 @@ bool Yap_find_prolog_culprit(USES_REGS1) {
while (curCP != YESCODE) {
curENV = (CELL *)(curENV[E_E]);
if (curENV == NULL)
if (curENV < ASP || curENV >= LCL0)
break;
pe = EnvPreg(curCP);
if (pe==NULL) {
pe = PredMetaCall;
}
if (pe->ModuleOfPred)
return set_clause_info(curCP, pe);
curCP = (yamop *)(curENV[E_CP]);