From f9a7741781450be790956b07123b4a7326348f87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Fri, 15 Aug 2014 19:34:20 -0500 Subject: [PATCH] fix overflow handling in meta-calls. --- C/absmi.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/C/absmi.c b/C/absmi.c index 009d3410e..ff1ebca12 100755 --- a/C/absmi.c +++ b/C/absmi.c @@ -13695,6 +13695,7 @@ Yap_absmi(int inp) /* fetch the module from PREG */ mod = PREG->y_u.Osbmp.mod; start_execute: + /* place to cut to */ b_ptr = B; /* we have mod, and ARG1 has the goal, let us roll */ /* Try to preserve the environment */ @@ -13837,7 +13838,7 @@ Yap_absmi(int inp) goto execute_metacall; } - /* execute, byt test first for interrupts */ + /* execute, but test first for interrupts */ execute_end: /* code copied from call */ #ifndef NO_CHECKING @@ -13891,13 +13892,13 @@ Yap_absmi(int inp) NoStackPExecute: WRITEBACK_Y_AS_ENV(); #ifdef SHADOW_S - Yap_REGS.S_ = SREG; + Yap_REGS.S_ = SREG; #endif - saveregs(); + saveregs_and_ycache(); d0 = interrupt_pexecute( pen PASS_REGS ); - setregs(); + setregs_and_ycache(); #ifdef SHADOW_S - SREG = Yap_REGS.S_; + SREG = Yap_REGS.S_; #endif if (!d0) FAIL(); if (d0 == 2) goto execute_stack_checked;