Skip to content

Commit

Permalink
patch 7.4.1914
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
brammool committed Jun 10, 2016
1 parent 1610d05 commit e429e70
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/os_unix.c
Expand Up @@ -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);
Expand Down Expand Up @@ -1171,6 +1177,8 @@ deathtrap SIGDEFARG(sigarg)
* calling free(). */
preserve_exit();

/* NOTREACHED */

#ifdef NBDEBUG
reset_signals();
may_core_dump();
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -753,6 +753,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1914,
/**/
1913,
/**/
Expand Down

0 comments on commit e429e70

Please sign in to comment.