|
Karsten Hopp |
2a29cc |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
2a29cc |
Subject: Patch 7.4.623
|
|
Karsten Hopp |
2a29cc |
Fcc: outbox
|
|
Karsten Hopp |
2a29cc |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
2a29cc |
Mime-Version: 1.0
|
|
Karsten Hopp |
2a29cc |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
2a29cc |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
2a29cc |
------------
|
|
Karsten Hopp |
2a29cc |
|
|
Karsten Hopp |
2a29cc |
Patch 7.4.623
|
|
Karsten Hopp |
2a29cc |
Problem: Crash with pattern: \(\)\{80000} (Dominique Pelle)
|
|
Karsten Hopp |
2a29cc |
Solution: When the max limit is large fall back to the old engine.
|
|
Karsten Hopp |
2a29cc |
Files: src/regexp_nfa.c
|
|
Karsten Hopp |
2a29cc |
|
|
Karsten Hopp |
2a29cc |
|
|
Karsten Hopp |
2a29cc |
*** ../vim-7.4.622/src/regexp_nfa.c 2015-02-05 20:29:55.071222529 +0100
|
|
Karsten Hopp |
2a29cc |
--- src/regexp_nfa.c 2015-02-10 18:09:53.878896813 +0100
|
|
Karsten Hopp |
2a29cc |
***************
|
|
Karsten Hopp |
2a29cc |
*** 2034,2042 ****
|
|
Karsten Hopp |
2a29cc |
}
|
|
Karsten Hopp |
2a29cc |
|
|
Karsten Hopp |
2a29cc |
/* The engine is very inefficient (uses too many states) when the
|
|
Karsten Hopp |
2a29cc |
! * maximum is much larger than the minimum. Bail out if we can
|
|
Karsten Hopp |
2a29cc |
! * use the other engine. */
|
|
Karsten Hopp |
2a29cc |
! if ((nfa_re_flags & RE_AUTO) && maxval > minval + 200)
|
|
Karsten Hopp |
2a29cc |
return FAIL;
|
|
Karsten Hopp |
2a29cc |
|
|
Karsten Hopp |
2a29cc |
/* Ignore previous call to nfa_regatom() */
|
|
Karsten Hopp |
2a29cc |
--- 2034,2043 ----
|
|
Karsten Hopp |
2a29cc |
}
|
|
Karsten Hopp |
2a29cc |
|
|
Karsten Hopp |
2a29cc |
/* The engine is very inefficient (uses too many states) when the
|
|
Karsten Hopp |
2a29cc |
! * maximum is much larger than the minimum and when the maximum is
|
|
Karsten Hopp |
2a29cc |
! * large. Bail out if we can use the other engine. */
|
|
Karsten Hopp |
2a29cc |
! if ((nfa_re_flags & RE_AUTO)
|
|
Karsten Hopp |
2a29cc |
! && (maxval > minval + 200 || maxval > 500))
|
|
Karsten Hopp |
2a29cc |
return FAIL;
|
|
Karsten Hopp |
2a29cc |
|
|
Karsten Hopp |
2a29cc |
/* Ignore previous call to nfa_regatom() */
|
|
Karsten Hopp |
2a29cc |
***************
|
|
Karsten Hopp |
2a29cc |
*** 4254,4260 ****
|
|
Karsten Hopp |
2a29cc |
* Add "state" and possibly what follows to state list ".".
|
|
Karsten Hopp |
2a29cc |
* Returns "subs_arg", possibly copied into temp_subs.
|
|
Karsten Hopp |
2a29cc |
*/
|
|
Karsten Hopp |
2a29cc |
-
|
|
Karsten Hopp |
2a29cc |
static regsubs_T *
|
|
Karsten Hopp |
2a29cc |
addstate(l, state, subs_arg, pim, off)
|
|
Karsten Hopp |
2a29cc |
nfa_list_T *l; /* runtime state list */
|
|
Karsten Hopp |
2a29cc |
--- 4255,4260 ----
|
|
Karsten Hopp |
2a29cc |
***************
|
|
Karsten Hopp |
2a29cc |
*** 4392,4397 ****
|
|
Karsten Hopp |
2a29cc |
--- 4392,4398 ----
|
|
Karsten Hopp |
2a29cc |
subs = &temp_subs;
|
|
Karsten Hopp |
2a29cc |
}
|
|
Karsten Hopp |
2a29cc |
|
|
Karsten Hopp |
2a29cc |
+ /* TODO: check for vim_realloc() returning NULL. */
|
|
Karsten Hopp |
2a29cc |
l->t = vim_realloc(l->t, newlen * sizeof(nfa_thread_T));
|
|
Karsten Hopp |
2a29cc |
l->len = newlen;
|
|
Karsten Hopp |
2a29cc |
}
|
|
Karsten Hopp |
2a29cc |
*** ../vim-7.4.622/src/version.c 2015-02-05 20:29:55.071222529 +0100
|
|
Karsten Hopp |
2a29cc |
--- src/version.c 2015-02-10 18:14:05.287650419 +0100
|
|
Karsten Hopp |
2a29cc |
***************
|
|
Karsten Hopp |
2a29cc |
*** 743,744 ****
|
|
Karsten Hopp |
2a29cc |
--- 743,746 ----
|
|
Karsten Hopp |
2a29cc |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
2a29cc |
+ /**/
|
|
Karsten Hopp |
2a29cc |
+ 623,
|
|
Karsten Hopp |
2a29cc |
/**/
|
|
Karsten Hopp |
2a29cc |
|
|
Karsten Hopp |
2a29cc |
--
|
|
Karsten Hopp |
2a29cc |
hundred-and-one symptoms of being an internet addict:
|
|
Karsten Hopp |
2a29cc |
210. When you get a divorce, you don't care about who gets the children,
|
|
Karsten Hopp |
2a29cc |
but discuss endlessly who can use the email address.
|
|
Karsten Hopp |
2a29cc |
|
|
Karsten Hopp |
2a29cc |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
2a29cc |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
2a29cc |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
2a29cc |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|