segfault with current vim 7.3a

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

segfault with current vim 7.3a

Markus Braun
Hi,

I get a segmentation fault with current vim 7.3a version (2251:8b3203df361f)
Here is the recipe to reproduce:

$ cd /tmp
$ echo foo > foo
$ vim -u NONE --noplugin -c "set grepprg=internal" -c "syntax on" -c "grep foo foo"

Built with following configure settings:

./configure --enable-gpm --enable-cscope --with-features=huge --enable-multibyte --with-x --enable-xim --enable-fontset --enable-gui=gnome2 --disable-gtk2-check --enable-gnome-check --disable-motif-check --disable-mzschemeinterp --enable-perlinterp --enable-pythoninterp --enable-rubyinterp --enable-tclinterp

Some GDB output:

(gdb) bt
#0  0x081b84ee in syn_cmd_clear (eap=0xbfffabc8, syncing=0) at syntax.c:3540
#1  0x081b1ef5 in ex_syntax (eap=0xbfffabc8) at syntax.c:6159
#2  0x080cdbc0 in do_one_cmd (cmdline=0x0, getline=0x80a3570 <get_func_line>, cookie=0x83029d8, flags=7) at ex_docmd.c:2640
#3  do_cmdline (cmdline=0x0, getline=0x80a3570 <get_func_line>, cookie=0x83029d8, flags=7) at ex_docmd.c:1109
#4  0x080a451f in call_user_func (fp=0x82b01b8, argcount=0, argvars=0xbfffb31c, rettv=0xbfffb474, firstline=1, lastline=1, selfdict=0x0) at eval.c:21709
#5  0x080a4de9 in call_func (func_name=<value optimized out>, len=<value optimized out>, rettv=0xbfffb474, argcount=0, argvars=0xbfffb31c, firstline=1, lastline=1, doesrange=0xbfffb480, evaluate=1, selfdict=0x0) at eval.c:8212
#6  0x080a870c in get_func_tv (name=0x82af400 "\200\375P2_SynSet", len=11, rettv=0xbfffb474, arg=0xbfffb488, firstline=1, lastline=1, doesrange=0xbfffb480, evaluate=1, selfdict=0x0) at eval.c:8054
#7  0x080ae0c9 in ex_call (eap=0xbfffb578) at eval.c:3378
#8  0x080cdbc0 in do_one_cmd (cmdline=0x0, getline=0x80e0550 <getnextac>, cookie=0xbfffb9cc, flags=7) at ex_docmd.c:2640
#9  do_cmdline (cmdline=0x0, getline=0x80e0550 <getnextac>, cookie=0xbfffb9cc, flags=7) at ex_docmd.c:1109
#10 0x080e00b9 in apply_autocmds_group (event=EVENT_SYNTAX, fname=0x82af3c8 "", fname_io=0x8303f40 "foo", force=1, group=-3, buf=0x8301818, eap=0x0) at fileio.c:9337
#11 0x0815b309 in did_set_string_option (opt_idx=294, varp=0x830259c, new_value_alloced=1, oldval=0x821cc34 "", errbuf=0xbfffbbec "\364/\r\267\300C\r\267\f", opt_flags=<value optimized out>) at option.c:6853
#12 0x08160431 in do_set (arg=0x82af35b "", opt_flags=<value optimized out>) at option.c:4759
#13 0x080c4cce in ex_set (eap=0xbfffbd48) at ex_docmd.c:11067
#14 0x080cdbc0 in do_one_cmd (cmdline=0x82af370 "set syntax=", getline=0x80e0550 <getnextac>, cookie=0xbfffc6cc, flags=3) at ex_docmd.c:2640
#15 do_cmdline (cmdline=0x82af370 "set syntax=", getline=0x80e0550 <getnextac>, cookie=0xbfffc6cc, flags=3) at ex_docmd.c:1109
#16 0x080aeba8 in ex_execute (eap=0xbfffc278) at eval.c:20002
#17 0x080cdbc0 in do_one_cmd (cmdline=0x0, getline=0x80e0550 <getnextac>, cookie=0xbfffc6cc, flags=7) at ex_docmd.c:2640
#18 do_cmdline (cmdline=0x0, getline=0x80e0550 <getnextac>, cookie=0xbfffc6cc, flags=7) at ex_docmd.c:1109
#19 0x080e00b9 in apply_autocmds_group (event=EVENT_FILETYPE, fname=0x8303f68 "", fname_io=0x8303f40 "foo", force=1, group=-3, buf=0x8301818, eap=0x0) at fileio.c:9337
#20 0x0816e364 in ex_vimgrep (eap=0xbfffea68) at quickfix.c:3264
#21 0x0816f2ee in ex_make (eap=0xbfffea68) at quickfix.c:2744
#22 0x080cdbc0 in do_one_cmd (cmdline=0xbffff2c7 "grep foo foo", getline=0, cookie=0x0, flags=11) at ex_docmd.c:2640
#23 do_cmdline (cmdline=0xbffff2c7 "grep foo foo", getline=0, cookie=0x0, flags=11) at ex_docmd.c:1109
#24 0x080d0e59 in do_cmdline_cmd (cmd=0xbffff2c7 "grep foo foo") at ex_docmd.c:715
#25 0x0810ab02 in exe_commands (argc=6400, argv=0xbffff064) at main.c:2755
#26 main (argc=6400, argv=0xbffff064) at main.c:880
(gdb) l
3535         * We have to disable this within ":syn include @group filename",
3536         * because otherwise @group would get deleted.
3537         * Only required for Vim 5.x syntax files, 6.0 ones don't contain ":syn
3538         * clear".
3539         */
3540        if (curwin->w_s->b_syn_topgrp != 0)
3541            return;
3542
3543        if (ends_excmd(*arg))
3544        {
(gdb) p curwin->w_s
$1 = (synblock_T *) 0x0


VIM version:

VIM - Vi IMproved 7.3 BETA (2010 May 15, compiled Jun  7 2010 10:03:46)
Compiled by mbr@home
Huge version with GTK2-GNOME GUI.  Features included (+) or not (-):
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent
+clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
+conceal +cryptv +cscope +cursorbind +cursorshape +dialog_con_gui +diff
+digraphs +dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi
+file_in_path +find_in_path +float +folding -footer +fork() +gettext
-hangul_input +iconv +insert_expand +jumplist +keymap +langmap +libcall
+linebreak +lispindent +listcmds +localmap +menu +mksession +modify_fname
+mouse +mouseshape +mouse_dec +mouse_gpm -mouse_jsbterm +mouse_netterm
-mouse_sysmouse +mouse_xterm +multi_byte +multi_lang -mzscheme +netbeans_intg
-osfiletype +path_extra +perl +persistent_undo +postscript +printer +profile
+python +quickfix +reltime +rightleft +ruby +scrollbind +signs +smartindent
-sniff +startuptime +statusline -sun_workshop +syntax +tag_binary
+tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title
 +toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo
+vreplace +wildignore +wildmenu +windows +writebackup +X11 -xfontset +xim
+xsmp_interact +xterm_clipboard -xterm_save
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: gcc -g -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include   -DORBIT2=1 -pthread -I/usr/include/libgnomeui-2.0 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1 -I/usr/include/libgnome-2.0 -I/usr/include/libbonoboui-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gtk-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/libxml2 -I/usr/include/pango-1.0 -I/usr/include/gail-1.0 -I/usr/include/freetype2 -I/usr/include/atk-1.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo -I/usr/include/gio-unix-2.0/ -I/usr/include/pixman-1 -I/usr/include/libpng12     -g -O2    -D_REENTRANT -D_GNU_SOURCE -DDEBIAN  -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -I/usr/lib/perl/5.10/CORE  -I/usr/include/python2.5  -I/usr/lib/ruby/1.8/i486-linux -DRUBY_VERSION=18  -pthread
Linking: gcc -g   -L.  -rdynamic -Wl,-export-dynamic  -Wl,-E   -L/usr/local/lib -o vim   -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lgio-2.0 -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0     -lgnomeui-2 -lbonoboui-2 -lgnomevfs-2 -lgnomecanvas-2 -lgnome-2 -lpopt -lbonobo-2 -lbonobo-activation -lORBit-2 -lart_lgpl_2 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lgio-2.0 -lpango-1.0 -lfreetype -lfontconfig -lgconf-2 -lgmodule-2.0 -lgobject-2.0 -lgthread-2.0 -lrt -lglib-2.0   -lXt -lncurses -lselinux  -lacl -lgpm   -Wl,-E  -fstack-protector -L/usr/local/lib  -L/usr/lib/perl/5.10/CORE -lperl -L/usr/lib/python2.5/config -lpython2.5 -lutil -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions  -lruby1.8 -lrt -lm  

Hope this is enough information :-)

Markus Braun

--
Any errors in spelling, tact or fact are transmission errors


signature.asc (197 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: segfault with current vim 7.3a

Bram Moolenaar

Markus Braun wrote:

> I get a segmentation fault with current vim 7.3a version (2251:8b3203df361f)
> Here is the recipe to reproduce:
>
> $ cd /tmp
> $ echo foo > foo
> $ vim -u NONE --noplugin -c "set grepprg=3Dinternal" -c "syntax on" -c "gre=
> p foo foo"

I can reproduce it.  Appears that curwin->w_s is NULL.
Must be in aucmd_win...  OK, I found a fix, I'll send it out.

--
        Very funny, Scotty.  Now beam down my clothes.

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.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