diff src/ex_docmd.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 e14feba578f1
children 1fe99999625c
line wrap: on
line diff
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -645,6 +645,7 @@ do_cmdline(
 # define cmd_cookie cookie
 #endif
     static int	call_depth = 0;		// recursiveness
+    ESTACK_CHECK_DECLARATION
 
 #ifdef FEAT_EVAL
     // For every pair of do_cmdline()/do_one_cmd() calls, use an extra memory
@@ -1260,6 +1261,7 @@ do_cmdline(
 
 	    estack_push(ETYPE_EXCEPT, current_exception->throw_name,
 						current_exception->throw_lnum);
+	    ESTACK_CHECK_SETUP
 	    current_exception->throw_name = NULL;
 
 	    discard_current_exception();	// uses IObuff if 'verbose'
@@ -1284,6 +1286,7 @@ do_cmdline(
 		vim_free(p);
 	    }
 	    vim_free(SOURCING_NAME);
+	    ESTACK_CHECK_NOW
 	    estack_pop();
 	}