Patch 7.4.528
Problem:    Crash when using matchadd() (Yasuhiro Matsumoto)
Solution:   Copy the match regprog.
Files:      src/screen.c


*** ../vim-7.4.527/src/screen.c 2014-11-19 13:21:24.984724043 +0100
--- src/screen.c        2014-11-27 13:26:05.754837048 +0100
***************
*** 7588,7593 ****
--- 7588,7599 ----
        shl->lnum = lnum;
        if (shl->rm.regprog != NULL)
        {
+           /* Remember whether shl->rm is using a copy of the regprog in
+            * cur->match. */
+           int regprog_is_copy = (shl != &search_hl && cur != NULL
+                               && shl == &cur->hl
+                               && cur->match.regprog == cur->hl.rm.regprog);
+ 
            nmatched = vim_regexec_multi(&shl->rm, win, shl->buf, lnum,
                    matchcol,
  #ifdef FEAT_RELTIME
***************
*** 7596,7601 ****
--- 7602,7611 ----
                    NULL
  #endif
                    );
+           /* Copy the regprog, in case it got freed and recompiled. */
+           if (regprog_is_copy)
+               cur->match.regprog = cur->hl.rm.regprog;
+ 
            if (called_emsg || got_int)
            {
                /* Error while handling regexp: stop using this regexp. */
*** ../vim-7.4.527/src/version.c        2014-11-23 15:57:45.568009419 +0100
--- src/version.c       2014-11-27 13:28:07.393495013 +0100
***************
*** 743,744 ****
--- 743,746 ----
  {   /* Add new patch number below this line */
+ /**/
+     528,
  /**/

-- 
FATAL ERROR! SYSTEM HALTED! - Press any key to continue doing nothing.

 /// 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