Daniel Hahler wrote:

> I am seeing a segfault with this patch (bisected) in a specific file:
> 
> To reproduce it:
> 1. wget https://raw.githubusercontent.com/blueyed/dotfiles/master/vimperatorrc
> 2. vim -u NONE -N -c 'syn on' vimperatorrc
> 3. Scroll around (<C-d>, PageUp/PageDown), it should crash after a few 
> seconds or earlier.
> 
> Here is the top of the backtrace:
> 
> #0  0x00000000005976f6 in vim_regexec_multi (rmp=0x7fffffff4690, 
> win=0xabffc0, buf=0x146dd60, lnum=180, col=0, tm=0x0) at regexp.c:8247
> #1  0x00000000005e3309 in syn_regexec (rmp=0x7fffffff4690, lnum=180, col=0, 
> st=0x189da18) at syntax.c:3272
> #2  0x00000000005e0d23 in syn_current_attr (syncing=0, displaying=1, 
> can_spell=0x0, keep_state=0) at syntax.c:2092
> #3  0x00000000005e0509 in get_syntax_attr (col=0, can_spell=0x0, 
> keep_state=0) at syntax.c:1851
> #4  0x00000000005a02c7 in win_line (wp=0xabffc0, lnum=180, startrow=5, 
> endrow=40, nochange=1) at screen.c:4318
> #5  0x000000000059b023 in win_update (wp=0xabffc0) at screen.c:2010
> #6  0x0000000000598bbc in update_debug_sign (buf=0x146dd60, lnum=10) at 
> screen.c:929
> #7  0x00000000004a2177 in ex_sign (eap=0x7fffffff4ec0) at ex_cmds.c:7334
> #8  0x00000000004ad026 in do_one_cmd (cmdlinep=0x7fffffff4fe0, sourcing=1, 
> cstack=0x7fffffff50d0, fgetline=0x4aaf90 <get_loop_line>, 
> cookie=0x7fffffff5880)
>     at ex_docmd.c:2705
> 
> The segfault happens at: 
> https://github.com/vim-jp/vim/blob/master/src/regexp.c#L8247-8248
> 
> (the gdb log is attached in full - with a second run, which resulted in a 
> shorter trace, but an unresolved top frame?!)

Same problem as Yasuhiro reported: A pointer to a compiled regexp is
kept while it is freed.

-- 
MONK: ... and the Lord spake, saying, "First shalt thou take out the Holy Pin,
      then shalt thou count to three, no more, no less.  Three shalt be the
      number thou shalt count, and the number of the counting shalt be three.
      Four shalt thou not count, neither count thou two, excepting that thou
      then proceed to three.  Five is right out.  Once the number three, being
      the third number, be reached, then lobbest thou thy Holy Hand Grenade of
      Antioch towards thou foe, who being naughty in my sight, shall snuff it.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [email protected] -- 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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui