Patch 7.4.623
Problem:    Crash with pattern: \(\)\{80000}  (Dominique Pelle)
Solution:   When the max limit is large fall back to the old engine.
Files:      src/regexp_nfa.c


*** ../vim-7.4.622/src/regexp_nfa.c     2015-02-05 20:29:55.071222529 +0100
--- src/regexp_nfa.c    2015-02-10 18:09:53.878896813 +0100
***************
*** 2034,2042 ****
            }
  
            /* The engine is very inefficient (uses too many states) when the
!            * maximum is much larger than the minimum.  Bail out if we can
!            * use the other engine. */
!           if ((nfa_re_flags & RE_AUTO) && maxval > minval + 200)
                return FAIL;
  
            /* Ignore previous call to nfa_regatom() */
--- 2034,2043 ----
            }
  
            /* The engine is very inefficient (uses too many states) when the
!            * maximum is much larger than the minimum and when the maximum is
!            * large.  Bail out if we can use the other engine. */
!           if ((nfa_re_flags & RE_AUTO)
!                                  && (maxval > minval + 200 || maxval > 500))
                return FAIL;
  
            /* Ignore previous call to nfa_regatom() */
***************
*** 4254,4260 ****
   * Add "state" and possibly what follows to state list ".".
   * Returns "subs_arg", possibly copied into temp_subs.
   */
- 
      static regsubs_T *
  addstate(l, state, subs_arg, pim, off)
      nfa_list_T                *l;         /* runtime state list */
--- 4255,4260 ----
***************
*** 4392,4397 ****
--- 4392,4398 ----
                    subs = &temp_subs;
                }
  
+               /* TODO: check for vim_realloc() returning NULL. */
                l->t = vim_realloc(l->t, newlen * sizeof(nfa_thread_T));
                l->len = newlen;
            }
*** ../vim-7.4.622/src/version.c        2015-02-05 20:29:55.071222529 +0100
--- src/version.c       2015-02-10 18:14:05.287650419 +0100
***************
*** 743,744 ****
--- 743,746 ----
  {   /* Add new patch number below this line */
+ /**/
+     623,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
210. When you get a divorce, you don't care about who gets the children,
     but discuss endlessly who can use the email address.

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui