From a50315396f36403fb58ad137f03f725a7dd79d49 Mon Sep 17 00:00:00 2001 From: "kr.angelov" Date: Mon, 6 Oct 2014 09:21:08 +0000 Subject: [PATCH] push a stack frame around recursive calls to guarantee that a nested call to a failing function will not crash --- src/runtime/c/pgf/jit.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/runtime/c/pgf/jit.c b/src/runtime/c/pgf/jit.c index 3f1bb36dd..3b851bf7e 100644 --- a/src/runtime/c/pgf/jit.c +++ b/src/runtime/c/pgf/jit.c @@ -1027,7 +1027,10 @@ pgf_jit_function(PgfReader* rdr, PgfAbstr* abstr, gu_printf(out, err, "\n"); #endif jit_pushr_p(JIT_R2); + jit_pushr_p(JIT_FP); + jit_movr_p(JIT_FP, JIT_SP); jit_callr(JIT_R0); + jit_popr_p(JIT_FP); jit_popr_p(JIT_VCLOS); break; }