stack overflow instructions could be wiped out by Restore.
This commit is contained in:
parent
39ccbd345d
commit
13e2febd30
@ -1905,6 +1905,7 @@ YAP_CompileClause(Term t)
|
|||||||
|
|
||||||
BACKUP_MACHINE_REGS();
|
BACKUP_MACHINE_REGS();
|
||||||
|
|
||||||
|
/* allow expansion during stack initialization */
|
||||||
Yap_ErrorMessage = NULL;
|
Yap_ErrorMessage = NULL;
|
||||||
ARG1 = t;
|
ARG1 = t;
|
||||||
YAPEnterCriticalSection();
|
YAPEnterCriticalSection();
|
||||||
@ -2001,21 +2002,9 @@ YAP_Init(YAP_init_args *yap_init)
|
|||||||
return YAP_BOOT_FROM_SAVED_ERROR;;
|
return YAP_BOOT_FROM_SAVED_ERROR;;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (yap_init->MaxStackSize) {
|
Yap_AllowGlobalExpansion = TRUE;
|
||||||
Yap_AllowLocalExpansion = FALSE;
|
Yap_AllowLocalExpansion = TRUE;
|
||||||
} else {
|
Yap_AllowTrailExpansion = TRUE;
|
||||||
Yap_AllowLocalExpansion = TRUE;
|
|
||||||
}
|
|
||||||
if (yap_init->MaxGlobalSize) {
|
|
||||||
Yap_AllowGlobalExpansion = FALSE;
|
|
||||||
} else {
|
|
||||||
Yap_AllowGlobalExpansion = TRUE;
|
|
||||||
}
|
|
||||||
if (yap_init->MaxTrailSize) {
|
|
||||||
Yap_AllowTrailExpansion = FALSE;
|
|
||||||
} else {
|
|
||||||
Yap_AllowTrailExpansion = TRUE;
|
|
||||||
}
|
|
||||||
Yap_InitExStacks (Trail, Stack);
|
Yap_InitExStacks (Trail, Stack);
|
||||||
if (yap_init->QuietMode) {
|
if (yap_init->QuietMode) {
|
||||||
yap_flags[QUIET_MODE_FLAG] = TRUE;
|
yap_flags[QUIET_MODE_FLAG] = TRUE;
|
||||||
@ -2082,6 +2071,22 @@ YAP_Init(YAP_init_args *yap_init)
|
|||||||
#endif /* YAPOR || TABLING */
|
#endif /* YAPOR || TABLING */
|
||||||
RECOVER_MACHINE_REGS();
|
RECOVER_MACHINE_REGS();
|
||||||
}
|
}
|
||||||
|
/* make sure we do this after restore */
|
||||||
|
if (yap_init->MaxStackSize) {
|
||||||
|
Yap_AllowLocalExpansion = FALSE;
|
||||||
|
} else {
|
||||||
|
Yap_AllowLocalExpansion = TRUE;
|
||||||
|
}
|
||||||
|
if (yap_init->MaxGlobalSize) {
|
||||||
|
Yap_AllowGlobalExpansion = FALSE;
|
||||||
|
} else {
|
||||||
|
Yap_AllowGlobalExpansion = TRUE;
|
||||||
|
}
|
||||||
|
if (yap_init->MaxTrailSize) {
|
||||||
|
Yap_AllowTrailExpansion = FALSE;
|
||||||
|
} else {
|
||||||
|
Yap_AllowTrailExpansion = TRUE;
|
||||||
|
}
|
||||||
if (yap_init->YapPrologRCFile) {
|
if (yap_init->YapPrologRCFile) {
|
||||||
Yap_PutValue(AtomConsultOnBoot, MkAtomTerm(Yap_LookupAtom(yap_init->YapPrologRCFile)));
|
Yap_PutValue(AtomConsultOnBoot, MkAtomTerm(Yap_LookupAtom(yap_init->YapPrologRCFile)));
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user