From e31ee86859528a7ffe00405645547d494e522fa8 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Tue, 7 Jan 2020 20:59:34 +0100 Subject: patch 8.2.0098: exe stack length can be wrong without being detected Problem: Exe stack length can be wrong without being detected. Solution: Add a check when ABORT_ON_INTERNAL_ERROR is defined. --- src/scriptfile.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/scriptfile.c') diff --git a/src/scriptfile.c b/src/scriptfile.c index 38516c360..a1755416b 100644 --- a/src/scriptfile.c +++ b/src/scriptfile.c @@ -1099,6 +1099,7 @@ do_source( proftime_T wait_start; #endif int trigger_source_post = FALSE; + ESTACK_CHECK_DECLARATION p = expand_env_save(fname); if (p == NULL) @@ -1216,6 +1217,7 @@ do_source( // Keep the sourcing name/lnum, for recursive calls. estack_push(ETYPE_SCRIPT, fname_exp, 0); + ESTACK_CHECK_SETUP #ifdef STARTUPTIME if (time_fd != NULL) @@ -1355,6 +1357,7 @@ do_source( if (got_int) emsg(_(e_interr)); + ESTACK_CHECK_NOW estack_pop(); if (p_verbose > 1) { -- cgit v1.2.1