Loading ...
Sorry, an error occurred while loading the content.

VIM-7.3 SEGV (cygwin)

Expand Messages
  • SungHyun Nam
    Hello, If I edit and write /etc/hosts , vim died. I can edit other files in /etc. And I found /etc/hosts is a symbolic link. $ l /etc/hosts lrwxrwxrwx 1 37
    Message 1 of 2 , Aug 31, 2010
    • 0 Attachment
      Hello,

      If I edit and write '/etc/hosts', vim died. I can edit other
      files in /etc. And I found /etc/hosts is a symbolic link.

      $ l /etc/hosts
      lrwxrwxrwx 1 37 2009-09-07 14:48 /etc/hosts ->
      /c/WINDOWS/system32/drivers/etc/hosts

      $ gdb ./vim.exe
      (gdb) r -u NONE --noplugin /etc/hosts
      Go<esc>dd:w<cr>

      Program received signal SIGSEGV, Segmentation fault.
      throw_exception (value=0x10c, type=1, cmdname=0x57d9e1 "write")
      at ex_eval.c:455
      455 mesg = excp->messages->throw_msg;
      (gdb) p excp
      $1 = (except_T *) 0xe4c240
      (gdb) p excp->messages
      $2 = (struct msglist *) 0x10c
      (gdb) bt
      #0 throw_exception (value=0x10c, type=1, cmdname=0x57d9e1 "write")
      at ex_eval.c:455
      #1 0x00457b6f in do_errthrow (cstack=0x22c67c, cmdname=0x57d9e1 "write")
      at ex_eval.c:348
      #2 0x00451def in do_cmdline (cmdline=0x0, getline=0x461ee0 <getexline>,
      cookie=0x0, flags=0) at ex_docmd.c:2701
      #3 0x004c1dc0 in nv_colon (cap=0x22cad8) at normal.c:5319
      #4 0x004c37f8 in normal_cmd (oap=0x22cb3c, toplevel=1) at normal.c:1190
      #5 0x0048472f in main_loop (cmdwin=0, noexmode=0) at main.c:1260
      #6 0x004877dc in main (argc=1629153933, argv=0xdf9fa0) at main.c:965
      (gdb) up
      #1 0x00457b6f in do_errthrow (cstack=0x22c67c, cmdname=0x57d9e1 "write")
      at ex_eval.c:348
      348 if (throw_exception(*msg_list, ET_ERROR, cmdname) == FAIL)
      (gdb) up
      #2 0x00451def in do_cmdline (cmdline=0x0, getline=0x461ee0 <getexline>,
      cookie=0x0, flags=0) at ex_docmd.c:2701
      2701 do_errthrow(cstack,
      (gdb) p msg_list
      $3 = (struct msglist **) 0x22ca54
      (gdb) p *msg_list
      $4 = (struct msglist *) 0x10c
      (gdb) p saved_msg_list
      $5 = (struct msglist **) 0x0
      (gdb) p private_msg_list
      $6 = (struct msglist *) 0x10c
      (gdb) quit
      The program is running. Exit anyway? (y or n) y

      $ LANG= ./vim.exe -g
      :ver
      VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Sep 1 2010 13:35:15)
      Included patches: 1-3
      Compiled by namsh@namsh
      Normal version with GTK2 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 -lua +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 -python3 +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: "/opt/share/vim"
      Compilation: gcc-4 -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK
      -D_REENTRANT -
      I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0
      -I/usr/i
      nclude/cairo -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/
      -I/usr/includ
      e/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1
      -I/usr/include/fr
      eetype2 -I/usr/include/libpng12 -g -O2 -D_FORTIFY_SOURCE=1
      Linking: gcc-4 -L/usr/local/lib -o vim.exe -lgtk-x11-2.0
      -lgdk-x11-2.0 -latk
      -1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lXinerama -lXi -lXrandr
      -lXcursor -lXcom
      posite -lXdamage -lpangoft2-1.0 -lgio-2.0 -lXext -lXfixes -lcairo
      -lpixman-1 -lg
      litz -lpng12 -lxcb-render-util -lXrender -lxcb-render -lxcb -lXau
      -lpango-1.0 -l
      fontconfig -lexpat -lfreetype -lz -lgobject-2.0 -lgmodule-2.0
      -lgthread-2.0 -lgl
      ib-2.0 -lintl -lXt -lX11 -lSM -lICE -lm -lncurses -liconv -lintl
      -L/usr/li
      b/python2.6/config -lpython2.6

      I build it by running:
      ./configure --enable-perlinterp=no --disable-gpm
      --enable-pythoninterp=yes --enable-tclinterp=no --enable-cscope
      --with-tlib=ncurses --enable-multibyte --prefix=/opt --with-x
      --enable-gui=gtk2

      And I found if I build it with '--without-x --disable-gui' instead
      of --with-x --enable-gui=gtk2', no SEGV.
      But the VIM GTK2 version dies though I run it with '-X' option.

      Thanks,
      namsh

      --
      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
    • Bram Moolenaar
      ... [...] The first argument of throw_exception() is wrong. It comes from the global msg_list. It works on all other platforms, I can t guess why it fails in
      Message 2 of 2 , Sep 18, 2010
      • 0 Attachment
        SungHyun Nam wrote:

        > If I edit and write '/etc/hosts', vim died. I can edit other
        > files in /etc. And I found /etc/hosts is a symbolic link.
        >
        > $ l /etc/hosts
        > lrwxrwxrwx 1 37 2009-09-07 14:48 /etc/hosts ->
        > /c/WINDOWS/system32/drivers/etc/hosts
        >
        > $ gdb ./vim.exe
        > (gdb) r -u NONE --noplugin /etc/hosts
        > Go<esc>dd:w<cr>
        >
        > Program received signal SIGSEGV, Segmentation fault.
        > throw_exception (value=0x10c, type=1, cmdname=0x57d9e1 "write")
        > at ex_eval.c:455
        > 455 mesg = excp->messages->throw_msg;
        > (gdb) p excp
        > $1 = (except_T *) 0xe4c240
        > (gdb) p excp->messages
        > $2 = (struct msglist *) 0x10c
        > (gdb) bt
        > #0 throw_exception (value=0x10c, type=1, cmdname=0x57d9e1 "write")
        > at ex_eval.c:455
        > #1 0x00457b6f in do_errthrow (cstack=0x22c67c, cmdname=0x57d9e1 "write")
        > at ex_eval.c:348
        > #2 0x00451def in do_cmdline (cmdline=0x0, getline=0x461ee0 <getexline>,
        > cookie=0x0, flags=0) at ex_docmd.c:2701
        > #3 0x004c1dc0 in nv_colon (cap=0x22cad8) at normal.c:5319

        [...]

        The first argument of throw_exception() is wrong. It comes from the
        global msg_list. It works on all other platforms, I can't guess why it
        fails in this specific situation.

        > And I found if I build it with '--without-x --disable-gui' instead
        > of --with-x --enable-gui=gtk2', no SEGV.
        > But the VIM GTK2 version dies though I run it with '-X' option.

        I don't see a direct relation.

        --
        "The question of whether computers can think is just like the question
        of whether submarines can swim." -- Edsger W. Dijkstra

        /// Bram Moolenaar -- Bram@... -- 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
      Your message has been successfully submitted and would be delivered to recipients shortly.