diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-06-23 14:21:42 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-06-23 14:21:42 +0200 |
commit | bcf9442307075bac40d44328c8bf7ea21857b138 (patch) | |
tree | 6890b363128e8cbffe09b274ecd1b1665393fac1 /src/evalfunc.c | |
parent | 5efa0102de6ed6049fb19e1e83787e5b3b24b6a2 (diff) |
patch 8.1.0098: segfault when pattern with \z() is very slowv8.1.0098
Problem: Segfault when pattern with \z() is very slow.
Solution: Check for NULL regprog. Add "nfa_fail" to test_override() to be
able to test this. Fix that 'searchhl' resets called_emsg.
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r-- | src/evalfunc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c index 24c31945d7..7325f5dfc5 100644 --- a/src/evalfunc.c +++ b/src/evalfunc.c @@ -13090,10 +13090,13 @@ f_test_override(typval_T *argvars, typval_T *rettv UNUSED) save_starting = -1; } } + else if (STRCMP(name, (char_u *)"nfa_fail") == 0) + nfa_fail_for_testing = val; else if (STRCMP(name, (char_u *)"ALL") == 0) { disable_char_avail_for_testing = FALSE; disable_redraw_for_testing = FALSE; + nfa_fail_for_testing = FALSE; if (save_starting >= 0) { starting = save_starting; |