make sure to save absmi registers before longjmp.

This commit is contained in:
Vítor Santos Costa 2012-02-05 10:51:40 +00:00
parent e6fb330f58
commit 6c98e37e18
4 changed files with 12 additions and 0 deletions

View File

@ -1822,6 +1822,9 @@ E);
if (LOCAL_PrologMode & UserCCallMode) {
if (!(EX = Yap_StoreTermInDB(Yap_MkApplTerm(fun, 2, nt), 0))) {
/* fat chance */
#if PUSH_REGS
restore_absmi_regs(&Yap_standard_regs);
#endif
siglongjmp(LOCAL_RestartEnv,1);
}
} else {

View File

@ -1473,6 +1473,9 @@ JumpToEnv(Term t USES_REGS) {
/* just keep the throwed object away, we don't need to care about it */
if (!(LOCAL_BallTerm = Yap_StoreTermInDB(t, 0))) {
/* fat chance */
#if PUSH_REGS
restore_absmi_regs(&Yap_standard_regs);
#endif
siglongjmp(LOCAL_RestartEnv,1);
}
/* careful, previous step may have caused a stack shift,

View File

@ -999,6 +999,9 @@ p_read_program( USES_REGS1 )
/* back to the top level we go */
Yap_CloseSlots(PASS_REGS1);
#if PUSH_REGS
restore_absmi_regs(&Yap_standard_regs);
#endif
siglongjmp(LOCAL_RestartEnv, 3);
return TRUE;
}

View File

@ -1564,6 +1564,9 @@ InteractSIGINT(int ch) {
/* in case someone mangles the P register */
}
LOCAL_PrologMode &= ~AsyncIntMode;
#if PUSH_REGS
restore_absmi_regs(&Yap_standard_regs);
#endif
siglongjmp(LOCAL_RestartEnv,1);
return -1;
case 'b':