proteanthread / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

Seg fault when opening a file #196

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1) Run the following commands to get the exact version of the file where I hit 
the crash:

$ git clone https://git.openstack.org/openstack-infra/config.git
$ cd config
$ git checkout da1465db0935ece6a0557c03c22a5eade5bfb613

2) Attempt to open this file:

$ vim modules/openstack_project/templates/nodepool/nodepool.yaml.erb
Vim: Caught deadly signal SEGV

Vim: Finished.
Segmentation fault (core dumped)

What version of the product are you using? On what operating system?

$ vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Sep 11 2013 12:28:28)
Included patches: 1-27
Modified by <bugzilla@redhat.com>
Compiled by <bugzilla@redhat.com>
Huge version without GUI.  Features included (+) or not (-):
+acl             +farsi           +mouse_netterm   +syntax
+arabic          +file_in_path    +mouse_sgr       +tag_binary
+autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
-balloon_eval    +float           +mouse_urxvt     -tag_any_white
-browse          +folding         +mouse_xterm     -tcl
++builtin_terms  -footer          +multi_byte      +terminfo
+byte_offset     +fork()          +multi_lang      +termresponse
+cindent         +gettext         -mzscheme        +textobjects
-clientserver    -hangul_input    +netbeans_intg   +title
-clipboard       +iconv           +path_extra      -toolbar
+cmdline_compl   +insert_expand   +perl            +user_commands
+cmdline_hist    +jumplist        +persistent_undo +vertsplit
+cmdline_info    +keymap          +postscript      +virtualedit
+comments        +langmap         +printer         +visual
+conceal         +libcall         +profile         +visualextra
+cryptv          +linebreak       +python/dyn      +viminfo
+cscope          +lispindent      -python3         +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con      -lua             +rightleft       +windows
+diff            +menu            +ruby/dyn        +writebackup
+digraphs        +mksession       +scrollbind      -X11
-dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     -xim
+emacs_tags      -mouseshape      -sniff           -xsmp
+eval            +mouse_dec       +startuptime     -xterm_clipboard
+ex_extra        +mouse_gpm       +statusline      -xterm_save
+extra_search    -mouse_jsbterm   -sun_workshop    -xpm
   system vimrc file: "/etc/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/etc"
 f-b for $VIMRUNTIME: "/usr/share/vim/vim74"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H   -I/usr/local/include  -O2 -g 
-pipe -Wall -fexceptions -fstack-protector --param=ssp-buffer-size=4 
-grecord-gcc-switches  -m64 -mtune=generic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1      
Linking: gcc   -L. -Wl,-z,relro -fstack-protector -rdynamic -Wl,-export-dynamic 
-Wl,--enable-new-dtags -Wl,-rpath,/usr/lib64/perl5/CORE  -Wl,-z,relro  
-L/usr/local/lib -Wl,--as-needed -o vim        -lm -lnsl  -lselinux  -lncurses 
-lacl -lattr -lgpm -ldl   -Wl,--enable-new-dtags 
-Wl,-rpath,/usr/lib64/perl5/CORE  -fstack-protector  -L/usr/lib64/perl5/CORE 
-lperl -lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc 

Please provide any additional information below.

(gdb) bt
#0  addstate (l=l@entry=0x7fffffffc710, state=state@entry=0xc8b740, 
subs_arg=<optimized out>, pim=0x7ffff1363ab0, off=off@entry=0) at 
regexp_nfa.c:4058
#1  0x00000000005118f2 in addstate_here (l=l@entry=0x7fffffffc710, 
state=state@entry=0xc8b740, subs=<optimized out>, pim=<optimized out>, 
ip=ip@entry=0x7fffffffc700) at regexp_nfa.c:4329
#2  0x000000000051e200 in nfa_regmatch (prog=prog@entry=0xc8a3f0, 
start=start@entry=0xc8b998, submatch=submatch@entry=0x7fffffffca30, 
m=m@entry=0x7fffffffccc0) at regexp_nfa.c:6245
#3  0x0000000000520911 in nfa_regtry (prog=prog@entry=0xc8a3f0, col=4) at 
regexp_nfa.c:6419
#4  0x0000000000520cec in nfa_regexec_both (line=<optimized out>, 
startcol=<optimized out>) at regexp_nfa.c:6603
#5  0x0000000000559739 in syn_regexec (rmp=rmp@entry=0x7fffffffd110, lnum=10, 
col=<optimized out>, st=st@entry=0xcdf5a8) at syntax.c:3272
#6  0x0000000000560f89 in syn_current_attr (syncing=syncing@entry=0, 
displaying=displaying@entry=1, can_spell=can_spell@entry=0x0, keep_state=0) at 
syntax.c:2092
#7  0x00000000005629c8 in get_syntax_attr (col=col@entry=4, 
can_spell=can_spell@entry=0x0, keep_state=keep_state@entry=0) at syntax.c:1851
#8  0x000000000052ecef in win_line (wp=wp@entry=0xa268e0, lnum=lnum@entry=10, 
startrow=startrow@entry=9, endrow=61, nochange=1) at screen.c:4274
#9  0x0000000000531fa8 in win_update (wp=wp@entry=0xa268e0) at screen.c:2010
#10 0x00000000005343e7 in update_screen (type=<optimized out>, type@entry=0) at 
screen.c:681
#11 0x0000000000596077 in main_loop (cmdwin=cmdwin@entry=0, 
noexmode=noexmode@entry=0) at main.c:1232
#12 0x000000000042733c in main (argc=<optimized out>, argv=<optimized out>) at 
main.c:1020

(gdb) list
4053            thread->state = state;
4054            if (pim == NULL)
4055            thread->pim.result = NFA_PIM_UNUSED;
4056            else
4057            {
4058            copy_pim(&thread->pim, pim);
4059            l->has_pim = TRUE;
4060            }
4061            copy_sub(&thread->subs.norm, &subs->norm);
4062    #ifdef FEAT_SYN_HL
(gdb) p pim
$3 = (nfa_pim_T *) 0x7ffff1363ab0
(gdb) p *pim
Cannot access memory at address 0x7ffff1363ab0

Original issue reported on code.google.com by russell....@gmail.com on 28 Jan 2014 at 12:37

GoogleCodeExporter commented 9 years ago
Same issue with Ubuntu 13.10's version (7.4.000-1ubuntu2)

$ vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug 12 2013 00:23:19)
Modified by pkg-vim-maintainers@lists.alioth.debian.org
Compiled by buildd@
Huge version without GUI.  Features included (+) or not (-):
+arabic          +file_in_path    +mouse_sgr       +tag_binary
+autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
-balloon_eval    +float           +mouse_urxvt     -tag_any_white
-browse          +folding         +mouse_xterm     -tcl
++builtin_terms  -footer          +multi_byte      +terminfo
+byte_offset     +fork()          +multi_lang      +termresponse
+cindent         +gettext         -mzscheme        +textobjects
-clientserver    -hangul_input    +netbeans_intg   +title
-clipboard       +iconv           +path_extra      -toolbar
+cmdline_compl   +insert_expand   -perl            +user_commands
+cmdline_hist    +jumplist        +persistent_undo +vertsplit
+cmdline_info    +keymap          +postscript      +virtualedit
+comments        +langmap         +printer         +visual
+conceal         +libcall         +profile         +visualextra
+cryptv          +linebreak       +python          +viminfo
+cscope          +lispindent      -python3         +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con      -lua             +rightleft       +windows
+diff            +menu            -ruby            +writebackup
+digraphs        +mksession       +scrollbind      -X11
-dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     -xim
+emacs_tags      -mouseshape      -sniff           -xsmp
+eval            +mouse_dec       +startuptime     -xterm_clipboard
+ex_extra        +mouse_gpm       +statusline      -xterm_save
+extra_search    -mouse_jsbterm   -sun_workshop    
+farsi           +mouse_netterm   +syntax          
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -g -O2 -fstack-protector 
--param=ssp-buffer-size=4 -Wformat -Werror=format-security -U_FORTIFY_SOURCE 
-D_FORTIFY_SOURCE=1      
Linking: gcc   -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--as-needed -o vim     
   -lm -ltinfo -lnsl  -lselinux  -lacl -lattr -lgpm -ldl    
-L/usr/lib/python2.7/config-x86_64-linux-gnu -lpython2.7 -lpthread -ldl -lutil 
-lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions

Original comment by thierry....@gmail.com on 28 Jan 2014 at 12:41

GoogleCodeExporter commented 9 years ago
Also, if you rename this file from "nodepool.yaml.erb" to "nodepool.erb", the 
crash no longer occurs.

Original comment by russell....@gmail.com on 28 Jan 2014 at 1:08

GoogleCodeExporter commented 9 years ago
On Kubuntu 13.10, recent vim 7.4.159, debug build, I see no crash.  (7.4 from 
the repos crashes, as Thierry reports.)

Original comment by John.B.L...@gmail.com on 29 Jan 2014 at 10:08

GoogleCodeExporter commented 9 years ago
This looks like the crash that was fixed by patch 7.4.051
Please reopen if it can be reproduced with the current patch level.

Original comment by brammool...@gmail.com on 31 Jan 2014 at 1:39