0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

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

@@ -344,3 +344,15 @@
#else
# define ERROR_IF_POPUP_WINDOW 0
#endif
#ifdef ABORT_ON_INTERNAL_ERROR
# define ESTACK_CHECK_DECLARATION int estack_len_before;
# define ESTACK_CHECK_SETUP estack_len_before = exestack.ga_len;
# define ESTACK_CHECK_NOW if (estack_len_before != exestack.ga_len) \
siemsg("Exestack length expected: %d, actual: %d", estack_len_before, exestack.ga_len);
#else
# define ESTACK_CHECK_DECLARATION
# define ESTACK_CHECK_SETUP
# define ESTACK_CHECK_NOW
#endif