diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2018-11-29 01:51:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-29 01:51:26 +0100 |
commit | 5a752c97d5294f4a69613db71adf9beb6a8f8790 (patch) | |
tree | 7483b993657af7aa07dd2cb3a3390bc0dbf40899 /src/nvim/regexp.h | |
parent | 98eaf60a98d0dfec9b1addb2c4efb3655c095044 (diff) | |
download | rneovim-5a752c97d5294f4a69613db71adf9beb6a8f8790.tar.gz rneovim-5a752c97d5294f4a69613db71adf9beb6a8f8790.tar.bz2 rneovim-5a752c97d5294f4a69613db71adf9beb6a8f8790.zip |
vim-patch:8.1.0098: segfault when pattern with \z() is very slow (#9283)
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.
https://github.com/vim/vim/commit/bcf9442307075bac40d44328c8bf7ea21857b138
closes #8788
Diffstat (limited to 'src/nvim/regexp.h')
-rw-r--r-- | src/nvim/regexp.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/nvim/regexp.h b/src/nvim/regexp.h index 97595c4d29..74ed34188c 100644 --- a/src/nvim/regexp.h +++ b/src/nvim/regexp.h @@ -5,19 +5,20 @@ #include "nvim/buffer_defs.h" #include "nvim/regexp_defs.h" -/* Second argument for vim_regcomp(). */ -#define RE_MAGIC 1 /* 'magic' option */ -#define RE_STRING 2 /* match in string instead of buffer text */ -#define RE_STRICT 4 /* don't allow [abc] without ] */ -#define RE_AUTO 8 /* automatic engine selection */ +// Second argument for vim_regcomp(). +#define RE_MAGIC 1 ///< 'magic' option +#define RE_STRING 2 ///< match in string instead of buffer text +#define RE_STRICT 4 ///< don't allow [abc] without ] +#define RE_AUTO 8 ///< automatic engine selection -/* values for reg_do_extmatch */ -#define REX_SET 1 /* to allow \z\(...\), */ -#define REX_USE 2 /* to allow \z\1 et al. */ +// values for reg_do_extmatch +#define REX_SET 1 ///< to allow \z\(...\), +#define REX_USE 2 ///< to allow \z\1 et al. +#define REX_ALL (REX_SET | REX_USE) -/* regexp.c */ +// regexp.c #ifdef INCLUDE_GENERATED_DECLARATIONS # include "regexp.h.generated.h" #endif -#endif /* NVIM_REGEXP_H */ +#endif // NVIM_REGEXP_H |