mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 17:36:29 +00:00
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.
bcf9442307
closes #8788
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user