0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.1.0192: executing regexp recursively fails with a crash

Problem:    Executing regexp recursively fails with a crash.
Solution:   Move global variables into "rex".
This commit is contained in:
Bram Moolenaar
2018-07-17 05:43:58 +02:00
parent 3166afd945
commit 0270f38e1a
4 changed files with 434 additions and 413 deletions

View File

@@ -50,8 +50,9 @@ typedef struct regprog
{
regengine_T *engine;
unsigned regflags;
unsigned re_engine; /* automatic, backtracking or nfa engine */
unsigned re_flags; /* second argument for vim_regcomp() */
unsigned re_engine; // automatic, backtracking or nfa engine
unsigned re_flags; // second argument for vim_regcomp()
int re_in_use; // prog is being executed
} regprog_T;
/*
@@ -65,7 +66,8 @@ typedef struct
regengine_T *engine;
unsigned regflags;
unsigned re_engine;
unsigned re_flags; /* second argument for vim_regcomp() */
unsigned re_flags;
int re_in_use;
int regstart;
char_u reganch;
@@ -101,7 +103,8 @@ typedef struct
regengine_T *engine;
unsigned regflags;
unsigned re_engine;
unsigned re_flags; /* second argument for vim_regcomp() */
unsigned re_flags;
int re_in_use;
nfa_state_T *start; /* points into state[] */