I don't have all the details on this at the moment, but I ran out of
time to investigate further today.  In summary, opening a new line
in a C comment causes Vim to dump core with various messages about
improper freeing of memory.

To reproduce:

    $ cat baz.c
             // order to avoid a message like this:
             //
    $ vim -N -u NONE baz.c
    :so $VIMRUNTIME/ftplugin/c.vim

With the cursor on the first line, type A and hit Enter twice.  I'm
not it's necessary to hit enter twice.  It seems to happen more
consistently if the keys are hit in rapid succession.

Example error message:

    *** glibc detected *** vim: free(): invalid next size (fast): 0x08488d88 ***
    *** glibc detected *** vim: malloc(): memory corruption: 0x08488d98 ***
    Inconsistency detected by ld.so: dl-open.c: 256: dl_open_worker: Assertion 
`_dl_debug_initialize (0, args->nsid)->r_state == RT_CONSISTENT' failed!

Example backtrace from core dump:

    (gdb) where
    #0  0x00827424 in __kernel_vsyscall ()
    #1  0x0013ba56 in kill () from /lib/libc.so.6
    #2  0x0813e8c0 in may_core_dump () at os_unix.c:3166
    #3  0x0813e860 in mch_exit (r=1) at os_unix.c:3132
    #4  0x081d62ba in getout (exitval=1) at main.c:1466
    #5  0x081050b0 in preserve_exit () at misc1.c:9053
    #6  0x0813cc3c in deathtrap (sigarg=6) at os_unix.c:1097
    #7  <signal handler called>
    #8  0x00827424 in __kernel_vsyscall ()
    #9  0x0013b781 in raise () from /lib/libc.so.6
    #10 0x0013d04a in abort () from /lib/libc.so.6
    #11 0x00179619 in __libc_message () from /lib/libc.so.6
    #12 0x0017fa71 in malloc_printerr () from /lib/libc.so.6
    #13 0x08108a7f in vim_free (x=0x886c400) at misc2.c:1740
    #14 0x080fad89 in open_line (dir=1, flags=2, second_line_indent=0) at 
misc1.c:1600
    #15 0x0806fda3 in ins_eol (c=13) at edit.c:9812
    #16 0x08063def in edit (cmdchar=65, startln=0, count=1) at edit.c:1313
    #17 0x0812454b in invoke_edit (cap=0xbff062c0, repl=0, cmd=65, startln=0) 
at normal.c:9143
    #18 0x081244f1 in nv_edit (cap=0xbff062c0) at normal.c:9116
    #19 0x08117cc4 in normal_cmd (oap=0xbff06368, toplevel=1) at normal.c:1193
    #20 0x081d5fd9 in main_loop (cmdwin=0, noexmode=0) at main.c:1294
    #21 0x081d5ad2 in main (argc=4, argv=0xbff06594) at main.c:998

Version and build info:

    $ export CFLAGS=-g
    $ ./configure --prefix=/home/garyjohn/src/vim-hg-new --enable-cscope
    $ make
    $ make install STRIP=/bin/true

    $ vim --version
    VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun 19 2012 11:35:17)
    Included patches: 1-556
    Compiled by [email protected]
    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 -mouse_urxvt +multi_byte +multi_lang -mzscheme 
    +netbeans_intg +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: "/home/garyjohn/src/vim-hg-new/share/vim"
    Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  
-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/glib-2.0 
-I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 
-I/usr/include/libpng12     -g -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1      
    Linking: gcc   -L/usr/local/lib -Wl,--as-needed -o vim   -lgtk-x11-2.0 
-lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 
-lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 
-lgmodule-2.0 -lglib-2.0   -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm 
-ltinfo -lelf -lnsl  -lselinux -lacl -lattr -lgpm           

System is Fedora 11 Linux.

Regards,
Gary

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

Raspunde prin e-mail lui