1
0
forked from aniani/vim

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.
This commit is contained in:
Bram Moolenaar
2020-01-07 20:59:34 +01:00
parent ce6db0273f
commit e31ee86859
10 changed files with 46 additions and 0 deletions

View File

@@ -1827,6 +1827,7 @@ apply_autocmds_group(
int did_save_redobuff = FALSE;
save_redo_T save_redo;
int save_KeyTyped = KeyTyped;
ESTACK_CHECK_DECLARATION
/*
* Quickly return if there are no autocommands for this event or
@@ -2021,6 +2022,7 @@ apply_autocmds_group(
// name and lnum are filled in later
estack_push(ETYPE_AUCMD, NULL, 0);
ESTACK_CHECK_SETUP
#ifdef FEAT_EVAL
save_current_sctx = current_sctx;
@@ -2124,6 +2126,7 @@ apply_autocmds_group(
filechangeshell_busy = FALSE;
autocmd_nested = save_autocmd_nested;
vim_free(SOURCING_NAME);
ESTACK_CHECK_NOW
estack_pop();
vim_free(autocmd_fname);
autocmd_fname = save_autocmd_fname;