From 8d1c35daeba537fdd0858d6fdf37b31aba6e3559 Mon Sep 17 00:00:00 2001 From: Juan Jose Garcia Ripoll Date: Sun, 8 Apr 2012 16:17:50 +0200 Subject: [PATCH] ecl_unrecoverable_error() verifies that some frame was established before jumping to it. --- src/c/error.d | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/c/error.d b/src/c/error.d index 1b3bc8e2c..97c5a06b9 100644 --- a/src/c/error.d +++ b/src/c/error.d @@ -91,8 +91,12 @@ ecl_unrecoverable_error(cl_env_ptr the_env, const char *message) ecl_unwind(the_env, destination); } } - destination = ecl_process_env()->frs_org; - ecl_unwind(the_env, destination); + if (the_env->frs_org <= the_env->frs_top) { + destination = ecl_process_env()->frs_org; + ecl_unwind(the_env, destination); + } else { + ecl_internal_error("\n;;;\n;;; No frame to jump to\n;;; Aborting ECL\n;;;"); + } } /*****************************************************************************/