From b4ff9b492a6e79865eeb57222a497eadfb27d0d3 Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Sun, 14 Jun 2009 11:17:12 -0500 Subject: [PATCH] make sure to recover stack before copying exception term. --- C/exec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/C/exec.c b/C/exec.c index f21c21d56..219b15ed8 100644 --- a/C/exec.c +++ b/C/exec.c @@ -1620,10 +1620,12 @@ JumpToEnv(Term t) { B->cp_env = (CELL *)env[E_E]; B->cp_ap = NEXTOP(PredHandleThrow->CodeOfPred,l); /* can recover Heap thanks to copy term :-( */ - B->cp_h = H; + /* B->cp_h = H; */ /* I could backtrack here, but it is easier to leave the unwinding to the emulator */ P = (yamop *)FAILCODE; + /* try to recover space */ + H = B->cp_h; t = clean_trail(t, dbt, B->cp_a1); B->cp_a3 = t; if (first_func != NULL) {