Mercurial > vim
changeset 9262:c9f2b70feac0 v7.4.1914
commit https://github.com/vim/vim/commit/e429e70f050cb2941f1f8427cf918b68444c904e
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Jun 10 19:49:14 2016 +0200
patch 7.4.1914
Problem: Executing autocommands while using the signal stack has a high
chance of crashing Vim.
Solution: Don't invoke autocommands when on the signal stack.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 10 Jun 2016 20:00:07 +0200 |
parents | 2f6e4c902d86 |
children | 25a3eae753aa |
files | src/os_unix.c src/version.c |
diffstat | 2 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/os_unix.c +++ b/src/os_unix.c @@ -1090,6 +1090,12 @@ deathtrap SIGDEFARG(sigarg) /* Remember how often we have been called. */ ++entered; +#ifdef FEAT_AUTOCMD + /* Executing autocommands is likely to use more stack space than we have + * available in the signal stack. */ + block_autocmds(); +#endif + #ifdef FEAT_EVAL /* Set the v:dying variable. */ set_vim_var_nr(VV_DYING, (long)entered); @@ -1171,6 +1177,8 @@ deathtrap SIGDEFARG(sigarg) * calling free(). */ preserve_exit(); + /* NOTREACHED */ + #ifdef NBDEBUG reset_signals(); may_core_dump();