vim73 SEGV

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

vim73 SEGV

SungHyun Nam-2
Hello,

hg changeset:   2255:0e27866cea99

VIM-7.3 BETA died with sequence below:
     vim newfile.sh
     :w
     :!chmod 0755 %
     :e

Regards,
namsh

GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(gdb) r -f -g ex.sh
Starting program: /home/namsh/srcs/vim7/src/vim -f -g ex.sh
[Thread debugging using libthread_db enabled]
[New Thread 0xb68e9750 (LWP 30966)]
Xlib:  extension "RANDR" missing on display ":7.0".
Xlib:  extension "Generic Event Extension" missing on display ":7.0".
Xlib:  extension "Generic Event Extension" missing on display ":7.0".
Xlib:  extension "Generic Event Extension" missing on display ":7.0".
[m
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb68e9750 (LWP 30966)]
0x081a847d in syn_incl_toplevel (id=54, flagsp=0xbfca73a0) at syntax.c:4590
4590    if ((*flagsp & HL_CONTAINED) || curwin->w_s->b_syn_topgrp == 0)
(gdb) p curwin->w_s
$1 = (synblock_T *) 0x0
(gdb) bt
#0  0x081a847d in syn_incl_toplevel (id=54, flagsp=0xbfca73a0) at
syntax.c:4590
#1  0x081aa30f in syn_cmd_keyword (eap=0xbfca7514, syncing=0) at
syntax.c:4741
#2  0x081a4ae5 in ex_syntax (eap=0xbfca7514) at syntax.c:6159
#3  0x080c956a in do_one_cmd (cmdlinep=0xbfca7690, sourcing=1,
     cstack=0xbfca7694, fgetline=0x80baf50 <getsourceline>,
cookie=0xbfca8020)
     at ex_docmd.c:2640
#4  0x080c7913 in do_cmdline (
     cmdline=0xa1f3a88 "syn keyword Todo XXX TODO FIXME CAUTION NOTE
WARNING",
     getline=0x80baf50 <getsourceline>, cookie=0xbfca8020, flags=3)
     at ex_docmd.c:1109
#5  0x080aa5c8 in ex_execute (eap=0xbfca7ad4) at eval.c:20002
#6  0x080c956a in do_one_cmd (cmdlinep=0xbfca7c50, sourcing=1,
     cstack=0xbfca7c54, fgetline=0x80baf50 <getsourceline>,
cookie=0xbfca8020)
     at ex_docmd.c:2640
#7  0x080c7913 in do_cmdline (cmdline=0xa1f5fb8 "\" my VIM syntax
extension",
     getline=0x80baf50 <getsourceline>, cookie=0xbfca8020, flags=7)
     at ex_docmd.c:1109
#8  0x080bb4bd in do_source (fname=0xa1f3fd7 "/home/namsh/.vim/syntax.vim",
     check_other=0, is_vimrc=0) at ex_cmds2.c:3204
#9  0x080bba05 in cmd_source (fname=0xa1f3fd7
"/home/namsh/.vim/syntax.vim",
     eap=0xbfca73a0) at ex_cmds2.c:2809
#10 0x080c956a in do_one_cmd (cmdlinep=0xbfca82d0, sourcing=1,
     cstack=0xbfca82d4, fgetline=0x80da990 <getnextac>, cookie=0xbfca8654)
     at ex_docmd.c:2640
#11 0x080c7913 in do_cmdline (cmdline=0x0, getline=0x80da990 <getnextac>,
     cookie=0xbfca8654, flags=7) at ex_docmd.c:1109
#12 0x080da459 in apply_autocmds_group (event=EVENT_BUFREADPRE,
     fname=0xa1bcb98 "", fname_io=0x9facf48 "ex.sh", force=0, group=-3,
     buf=0xa1fd418, eap=0xbfca8994) at fileio.c:9337
#13 0x080da8b8 in apply_autocmds_exarg (event=EVENT_BUFADD,
     fname=0xbfca73a0 "", fname_io=0x0, force=0, buf=0xa1fd418,
eap=0xbfca8994)
     at fileio.c:8963
#14 0x080e4a10 in readfile (fname=0x9fb3328 "/home/namsh/tmp/ex.sh",
     sfname=0x9facf48 "ex.sh", from=0, lines_to_skip=0,
     lines_to_read=2147483647, eap=0xbfca8994, flags=17) at fileio.c:785
#15 0x08077f71 in buf_contents_changed (buf=0x9fae3b8) at buffer.c:5547
#16 0x080e64e2 in buf_check_timestamp (buf=0x9fae3b8, focus=0) at
fileio.c:6885
#17 0x080e666f in check_timestamps (focus=0) at fileio.c:6716
#18 0x080fd9ec in main_loop (cmdwin=0, noexmode=0) at main.c:1027
#19 0x08100b82 in main (argc=Cannot access memory at address 0x0
) at main.c:960

--
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
Reply | Threaded
Open this post in threaded view
|

Re: vim73 SEGV

Bram Moolenaar

SungHyun Nam wrote:

> hg changeset:   2255:0e27866cea99
>
> VIM-7.3 BETA died with sequence below:
>      vim newfile.sh
>      :w
>      :!chmod 0755 %
>      :e

I'll add it to the todo list.  Didn't try reproducing it yet.

> Regards,
> namsh
>
> GNU gdb 6.8-debian
> Copyright (C) 2008 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "i486-linux-gnu"...
> (gdb) r -f -g ex.sh
> Starting program: /home/namsh/srcs/vim7/src/vim -f -g ex.sh
> [Thread debugging using libthread_db enabled]
> [New Thread 0xb68e9750 (LWP 30966)]
> Xlib:  extension "RANDR" missing on display ":7.0".
> Xlib:  extension "Generic Event Extension" missing on display ":7.0".
> Xlib:  extension "Generic Event Extension" missing on display ":7.0".
> Xlib:  extension "Generic Event Extension" missing on display ":7.0".
> [m
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0xb68e9750 (LWP 30966)]
> 0x081a847d in syn_incl_toplevel (id=54, flagsp=0xbfca73a0) at syntax.c:4590
> 4590    if ((*flagsp & HL_CONTAINED) || curwin->w_s->b_syn_topgrp == 0)
> (gdb) p curwin->w_s
> $1 = (synblock_T *) 0x0
> (gdb) bt
> #0  0x081a847d in syn_incl_toplevel (id=54, flagsp=0xbfca73a0) at
> syntax.c:4590
> #1  0x081aa30f in syn_cmd_keyword (eap=0xbfca7514, syncing=0) at
> syntax.c:4741
> #2  0x081a4ae5 in ex_syntax (eap=0xbfca7514) at syntax.c:6159
> #3  0x080c956a in do_one_cmd (cmdlinep=0xbfca7690, sourcing=1,
>      cstack=0xbfca7694, fgetline=0x80baf50 <getsourceline>,
> cookie=0xbfca8020)
>      at ex_docmd.c:2640
> #4  0x080c7913 in do_cmdline (
>      cmdline=0xa1f3a88 "syn keyword Todo XXX TODO FIXME CAUTION NOTE
> WARNING",
>      getline=0x80baf50 <getsourceline>, cookie=0xbfca8020, flags=3)
>      at ex_docmd.c:1109
> #5  0x080aa5c8 in ex_execute (eap=0xbfca7ad4) at eval.c:20002
> #6  0x080c956a in do_one_cmd (cmdlinep=0xbfca7c50, sourcing=1,
>      cstack=0xbfca7c54, fgetline=0x80baf50 <getsourceline>,
> cookie=0xbfca8020)
>      at ex_docmd.c:2640
> #7  0x080c7913 in do_cmdline (cmdline=0xa1f5fb8 "\" my VIM syntax
> extension",
>      getline=0x80baf50 <getsourceline>, cookie=0xbfca8020, flags=7)
>      at ex_docmd.c:1109
> #8  0x080bb4bd in do_source (fname=0xa1f3fd7 "/home/namsh/.vim/syntax.vim",
>      check_other=0, is_vimrc=0) at ex_cmds2.c:3204
> #9  0x080bba05 in cmd_source (fname=0xa1f3fd7
> "/home/namsh/.vim/syntax.vim",
>      eap=0xbfca73a0) at ex_cmds2.c:2809
> #10 0x080c956a in do_one_cmd (cmdlinep=0xbfca82d0, sourcing=1,
>      cstack=0xbfca82d4, fgetline=0x80da990 <getnextac>, cookie=0xbfca8654)
>      at ex_docmd.c:2640
> #11 0x080c7913 in do_cmdline (cmdline=0x0, getline=0x80da990 <getnextac>,
>      cookie=0xbfca8654, flags=7) at ex_docmd.c:1109
> #12 0x080da459 in apply_autocmds_group (event=EVENT_BUFREADPRE,
>      fname=0xa1bcb98 "", fname_io=0x9facf48 "ex.sh", force=0, group=-3,
>      buf=0xa1fd418, eap=0xbfca8994) at fileio.c:9337
> #13 0x080da8b8 in apply_autocmds_exarg (event=EVENT_BUFADD,
>      fname=0xbfca73a0 "", fname_io=0x0, force=0, buf=0xa1fd418,
> eap=0xbfca8994)
>      at fileio.c:8963
> #14 0x080e4a10 in readfile (fname=0x9fb3328 "/home/namsh/tmp/ex.sh",
>      sfname=0x9facf48 "ex.sh", from=0, lines_to_skip=0,
>      lines_to_read=2147483647, eap=0xbfca8994, flags=17) at fileio.c:785
> #15 0x08077f71 in buf_contents_changed (buf=0x9fae3b8) at buffer.c:5547
> #16 0x080e64e2 in buf_check_timestamp (buf=0x9fae3b8, focus=0) at
> fileio.c:6885
> #17 0x080e666f in check_timestamps (focus=0) at fileio.c:6716
> #18 0x080fd9ec in main_loop (cmdwin=0, noexmode=0) at main.c:1027
> #19 0x08100b82 in main (argc=Cannot access memory at address 0x0
> ) at main.c:960

--
A bad peace is better than a good war. - Yiddish Proverb

 /// 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
Reply | Threaded
Open this post in threaded view
|

Re: vim73 SEGV

Dominique Pellé
In reply to this post by SungHyun Nam-2
AM, SungHyun Nam wrote:

> Hello,
>
> hg changeset:   2255:0e27866cea99
>
> VIM-7.3 BETA died with sequence below:
>    vim newfile.sh
>    :w
>    :!chmod 0755 %
>    :e
>
> Regards,
> namsh
>
> GNU gdb 6.8-debian
> Copyright (C) 2008 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later
> <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "i486-linux-gnu"...
> (gdb) r -f -g ex.sh
> Starting program: /home/namsh/srcs/vim7/src/vim -f -g ex.sh
> [Thread debugging using libthread_db enabled]
> [New Thread 0xb68e9750 (LWP 30966)]
> Xlib:  extension "RANDR" missing on display ":7.0".
> Xlib:  extension "Generic Event Extension" missing on display ":7.0".
> Xlib:  extension "Generic Event Extension" missing on display ":7.0".
> Xlib:  extension "Generic Event Extension" missing on display ":7.0".
> [m
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0xb68e9750 (LWP 30966)]
> 0x081a847d in syn_incl_toplevel (id=54, flagsp=0xbfca73a0) at syntax.c:4590
> 4590        if ((*flagsp & HL_CONTAINED) || curwin->w_s->b_syn_topgrp == 0)
> (gdb) p curwin->w_s
> $1 = (synblock_T *) 0x0
> (gdb) bt
> #0  0x081a847d in syn_incl_toplevel (id=54, flagsp=0xbfca73a0) at
> syntax.c:4590
> #1  0x081aa30f in syn_cmd_keyword (eap=0xbfca7514, syncing=0) at
> syntax.c:4741
> #2  0x081a4ae5 in ex_syntax (eap=0xbfca7514) at syntax.c:6159
> #3  0x080c956a in do_one_cmd (cmdlinep=0xbfca7690, sourcing=1,
>    cstack=0xbfca7694, fgetline=0x80baf50 <getsourceline>, cookie=0xbfca8020)
>    at ex_docmd.c:2640
> #4  0x080c7913 in do_cmdline (
>    cmdline=0xa1f3a88 "syn keyword Todo XXX TODO FIXME CAUTION NOTE WARNING",
>    getline=0x80baf50 <getsourceline>, cookie=0xbfca8020, flags=3)
>    at ex_docmd.c:1109
> #5  0x080aa5c8 in ex_execute (eap=0xbfca7ad4) at eval.c:20002
> #6  0x080c956a in do_one_cmd (cmdlinep=0xbfca7c50, sourcing=1,
>    cstack=0xbfca7c54, fgetline=0x80baf50 <getsourceline>, cookie=0xbfca8020)
>    at ex_docmd.c:2640
> #7  0x080c7913 in do_cmdline (cmdline=0xa1f5fb8 "\" my VIM syntax
> extension",
>    getline=0x80baf50 <getsourceline>, cookie=0xbfca8020, flags=7)
>    at ex_docmd.c:1109
> #8  0x080bb4bd in do_source (fname=0xa1f3fd7 "/home/namsh/.vim/syntax.vim",
>    check_other=0, is_vimrc=0) at ex_cmds2.c:3204
> #9  0x080bba05 in cmd_source (fname=0xa1f3fd7 "/home/namsh/.vim/syntax.vim",
>    eap=0xbfca73a0) at ex_cmds2.c:2809
> #10 0x080c956a in do_one_cmd (cmdlinep=0xbfca82d0, sourcing=1,
>    cstack=0xbfca82d4, fgetline=0x80da990 <getnextac>, cookie=0xbfca8654)
>    at ex_docmd.c:2640
> #11 0x080c7913 in do_cmdline (cmdline=0x0, getline=0x80da990 <getnextac>,
>    cookie=0xbfca8654, flags=7) at ex_docmd.c:1109
> #12 0x080da459 in apply_autocmds_group (event=EVENT_BUFREADPRE,
>    fname=0xa1bcb98 "", fname_io=0x9facf48 "ex.sh", force=0, group=-3,
>    buf=0xa1fd418, eap=0xbfca8994) at fileio.c:9337
> #13 0x080da8b8 in apply_autocmds_exarg (event=EVENT_BUFADD,
>    fname=0xbfca73a0 "", fname_io=0x0, force=0, buf=0xa1fd418,
> eap=0xbfca8994)
>    at fileio.c:8963
> #14 0x080e4a10 in readfile (fname=0x9fb3328 "/home/namsh/tmp/ex.sh",
>    sfname=0x9facf48 "ex.sh", from=0, lines_to_skip=0,
>    lines_to_read=2147483647, eap=0xbfca8994, flags=17) at fileio.c:785
> #15 0x08077f71 in buf_contents_changed (buf=0x9fae3b8) at buffer.c:5547
> #16 0x080e64e2 in buf_check_timestamp (buf=0x9fae3b8, focus=0) at
> fileio.c:6885
> #17 0x080e666f in check_timestamps (focus=0) at fileio.c:6716
> #18 0x080fd9ec in main_loop (cmdwin=0, noexmode=0) at main.c:1027
> #19 0x08100b82 in main (argc=Cannot access memory at address 0x0
> ) at main.c:960


I can't reproduce it.   In your stack, I see that it's reading
"/home/namsh/tmp/ex.sh"
and /home/namsh/.vim/syntax.vim and that autocommands are triggered.
Something in your local configuration is likely to cause the bug.

Things you can try:
- try to reproduce it with  vim --noplugin -u NONE
- or find the minimalistic ~/.vimrc content which still triggers the bug?
- or send your ~/.vim + ~/.vim/ content (if you don't mind sharing)
  so we can maybe reproduce it
- try to run it with valgrind memory checker (just prefix vim valgrind):
  $ valgrind vim newfile.sh

Regards
-- Dominique

--
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
Reply | Threaded
Open this post in threaded view
|

Re: vim73 SEGV

Bram Moolenaar
In reply to this post by SungHyun Nam-2

SungHyun Nam wrote:

> hg changeset:   2255:0e27866cea99
>
> VIM-7.3 BETA died with sequence below:
>      vim newfile.sh
>      :w
>      :!chmod 0755 %
>      :e

I cannot reproduce it.  Looks like a problem that was fixed in changeset
2253:772bfca06c18, but you should have that fix.  Are you sure you
rebuild Vim after getting the 2255 version?

--
Press any key to continue, press any other key to quit.

 /// 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
Reply | Threaded
Open this post in threaded view
|

Re: vim73 SEGV

SungHyun Nam-2
In reply to this post by Dominique Pellé
Dominique Pellé wrote:
> AM, SungHyun Nam wrote:
>>
>> hg changeset:   2255:0e27866cea99
>>
>> VIM-7.3 BETA died with sequence below:
>>     vim newfile.sh
>>     :w
>>     :!chmod 0755 %
>>     :e
[snip...]

>
> I can't reproduce it.   In your stack, I see that it's reading
> "/home/namsh/tmp/ex.sh"
> and /home/namsh/.vim/syntax.vim and that autocommands are triggered.
> Something in your local configuration is likely to cause the bug.
>
> Things you can try:
> - try to reproduce it with  vim --noplugin -u NONE
> - or find the minimalistic ~/.vimrc content which still triggers the bug?
> - or send your ~/.vim + ~/.vim/ content (if you don't mind sharing)
>    so we can maybe reproduce it
> - try to run it with valgrind memory checker (just prefix vim valgrind):
>    $ valgrind vim newfile.sh

Yes, the syntax.vim was caused the problem.
I could reproduce the problem with script file below:
     $ rm -f ex.sh; vim --noplugin -u testrc ex.sh
     :w
     :!chmod 0755 %
     :e

And the 'testrc' is:

     set nocp
     " syntax on
     augroup AUG_MiscFunc
       au!
       au BufNewFile,BufReadPre * call SyntaxTodoSet()
     augroup END

     func! SyntaxTodoSet()
       exec 'syn keyword '.&ft.'Todo XXX TODO FIXME CAUTION NOTE WARNING'
       exec 'hi link '.&ft.'Todo Todo'
     endfunc

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
Reply | Threaded
Open this post in threaded view
|

Re: vim73 SEGV

SungHyun Nam-2
In reply to this post by Bram Moolenaar
Bram Moolenaar wrote:

>
> SungHyun Nam wrote:
>
>> hg changeset:   2255:0e27866cea99
>>
>> VIM-7.3 BETA died with sequence below:
>>       vim newfile.sh
>>       :w
>>       :!chmod 0755 %
>>       :e
>
> I cannot reproduce it.  Looks like a problem that was fixed in changeset
> 2253:772bfca06c18, but you should have that fix.  Are you sure you
> rebuild Vim after getting the 2255 version?

Oops!  It seems not.  The vim binary was built at Jun 7.  Though
the 2253 was modified at Jun 7, the 2255 was modified at Jun 8.
So that, the vim binary definitely did not built with 2255.

Now I cannot reproduce the problem (changeset: 2263:ae2e615a7320).

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