diff src/scriptfile.c @ 19075:af1eca322b9e v8.2.0098

patch 8.2.0098: exe stack length can be wrong without being detected Commit: https://github.com/vim/vim/commit/e31ee86859528a7ffe00405645547d494e522fa8 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jan 7 20:59:34 2020 +0100 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.
author Bram Moolenaar <Bram@vim.org>
date Tue, 07 Jan 2020 21:00:07 +0100
parents 5a62b4a0c961
children 44c6498535c9
line wrap: on
line diff
--- 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)
     {