From 9187c658b8c0bed6408b02f160cf547040b9a40f Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Fri, 8 Oct 2010 10:45:50 +0100 Subject: [PATCH] fix very large clause handling --- C/absmi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/C/absmi.c b/C/absmi.c index 8f2062beb..6491394a4 100755 --- a/C/absmi.c +++ b/C/absmi.c @@ -1677,7 +1677,8 @@ Yap_absmi(int inp) /* ensure_space */ BOp(ensure_space, Osbpi); { - Int sz = PREG->u.Osbpi.i; + Int sz = PREG->u.Osbpi.i; + UInt arity = PREG->u.Osbpi.p->ArityOfPE; PREG = NEXTOP(PREG,Osbpi); if (Unsigned(H) + sz > Unsigned(YREG)-CreepFlag) { YENV[E_CP] = (CELL) CPREG; @@ -1689,7 +1690,7 @@ Yap_absmi(int inp) if (ASP > (CELL *)PROTECT_FROZEN_B(B)) ASP = (CELL *)PROTECT_FROZEN_B(B); saveregs(); - if (!Yap_gcl(sz, PREG->u.Osbpi.p->ArityOfPE, YENV, PREG)) { + if (!Yap_gcl(sz, arity, YENV, PREG)) { Yap_Error(OUT_OF_STACK_ERROR,TermNil,Yap_ErrorMessage); setregs(); FAIL();