I have a reproable crash, apparently due to syntax highlighting memory
corruption.

The stack traces below were taken with WinDbg while running Vim
7.2.108 on Windows.
MacVim is also horribly slow with jquery.vim and eventually crashes.

Download the syntax highlighting file for jQuery,
http://www.vim.org/scripts/script.php?script_id=2416

Download jQuery.js, http://jqueryjs.googlecode.com/files/jquery-1.3.2.js

Run
    gvim -u NONE jQuery.js
    :se nocp
    :syn on

The regular Javascript syntax highlighting is fine.
Move around, everything is good.

    G
    :so jquery.vim

Watch your CPU meter max out and memory usage grow for many seconds.
If you're running gvim under a debugger, break in every so often and
look at the current call stack. It'll be something like this
(I saw fastcopy repeatedly).

    0:001> ~0k
    ChildEBP RetAddr
    0012f6bc 0040fe6b gvim!fastcopy_I+0x5a
    0012f6cc 00424490 gvim!_VEC_memcpy+0x52
    0012f6ec 004ca55b gvim!_VEC_memzero+0x36
    0012f708 0045d9ed gvim!ga_grow+0x5b
[d:\projects\vimsrc\vim7\src\misc2.c @ 1989]
    0012f714 0045dd81 gvim!push_current_state+0xd
[d:\projects\vimsrc\vim7\src\syntax.c @ 2727]
    0012f728 0045e761 gvim!push_next_match+0x21
[d:\projects\vimsrc\vim7\src\syntax.c @ 2379]
    0012f878 0045eab1 gvim!syn_current_attr+0x811
[d:\projects\vimsrc\vim7\src\syntax.c @ 2171]
    0012f898 00460786 gvim!syn_finish_line+0x21
[d:\projects\vimsrc\vim7\src\syntax.c @ 1693]
    0012f8bc 0048baf3 gvim!syntax_start+0x1f6
[d:\projects\vimsrc\vim7\src\syntax.c @ 565]
    0012fb50 0048fb20 gvim!win_line+0x1d3
[d:\projects\vimsrc\vim7\src\screen.c @ 2727]
    0012fbec 00492656 gvim!win_update+0x1420
[d:\projects\vimsrc\vim7\src\screen.c @ 1768]
    0012fc0c 004f54be gvim!update_screen+0x496
[d:\projects\vimsrc\vim7\src\screen.c @ 522]
    0012fc88 004f842c gvim!main_loop+0x24e
[d:\projects\vimsrc\vim7\src\main.c @ 1109]
    0012fdcc 00573dc2 gvim!VimMain+0xbbc
[d:\projects\vimsrc\vim7\src\main.c @ 942]
    0012fef0 0040af6c gvim!WinMain+0x92
[d:\projects\vimsrc\vim7\src\os_w32exe.c @ 131]
    [...]
    0:000> g

Or this:

    0:001> ~0k
    ChildEBP RetAddr
    0012f728 0045e458 gvim!did_match_already+0x35
[d:\projects\vimsrc\vim7\src\syntax.c @ 2350]
    0012f878 0045eab1 gvim!syn_current_attr+0x508
[d:\projects\vimsrc\vim7\src\syntax.c @ 2040]
    0012f898 00460786 gvim!syn_finish_line+0x21
[d:\projects\vimsrc\vim7\src\syntax.c @ 1693]
    0012f8bc 0048baf3 gvim!syntax_start+0x1f6
[d:\projects\vimsrc\vim7\src\syntax.c @ 565]
    0012fb50 0048fb20 gvim!win_line+0x1d3
[d:\projects\vimsrc\vim7\src\screen.c @ 2727]
    0012fbec 00492656 gvim!win_update+0x1420
[d:\projects\vimsrc\vim7\src\screen.c @ 1768]
    0012fc0c 004f54be gvim!update_screen+0x496
[d:\projects\vimsrc\vim7\src\screen.c @ 522]
    0012fc88 004f842c gvim!main_loop+0x24e
[d:\projects\vimsrc\vim7\src\main.c @ 1109]
    0012fdcc 00573dc2 gvim!VimMain+0xbbc
[d:\projects\vimsrc\vim7\src\main.c @ 942]
    0012fef0 0040af6c gvim!WinMain+0x92
[d:\projects\vimsrc\vim7\src\os_w32exe.c @ 131]
    [...]
    0:001> g

Eventually, the prompt will come back.
Memory usage will be huge (for Vim), about 130MB.

Go somewhere else in the file, such as ":3333".
Try holding down the Enter key.
Eventually, you should see an Access violation.

    (2218.18ec): Access violation - code c0000005 (first chance)
    First chance exceptions are reported before any exception handling.
    This exception may be expected and handled.
    eax=00000000 ebx=01df59e8 ecx=00000000 edx=01df6868 esi=025c11cc
edi=ffe14700
    eip=0045e08c esp=0012f730 ebp=00000000 iopl=0         nv up ei ng
nz na pe nc
    cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000
efl=00010286
    gvim!syn_current_attr+0x13c:
    0045e08c 394f44          cmp     dword ptr [edi+44h],ecx
ds:0023:ffe14744=????????
    0:000> kp
    ChildEBP RetAddr
    0012f878 0045eab1 gvim!syn_current_attr(int syncing = <Memory
access error>, int displaying = <Memory access error>, int * can_spell
= <Memory access error>, int keep_state = <Memory access error>)+0x13c
[d:\projects\vimsrc\vim7\src\syntax.c @ 1888]
    0012f898 00460786 gvim!syn_finish_line(int syncing =
-2013440)+0x21 [d:\projects\vimsrc\vim7\src\syntax.c @ 1693]
    0012f8bc 0048baf3 gvim!syntax_start(struct window_S * wp =
0x00000000, long lnum = 3313)+0x1f6
[d:\projects\vimsrc\vim7\src\syntax.c @ 565]
    0012fb50 0048fb20 gvim!win_line(struct window_S * wp = 0x00000000,
long lnum = <Memory access error>, int startrow = <Memory access
error>, int endrow = <Memory access error>, int nochange = <Memory
access error>)+0x1d3 [d:\projects\vimsrc\vim7\src\screen.c @ 2727]
    0012fbec 00492656 gvim!win_update(struct window_S * wp =
0x01df59e8)+0x1420 [d:\projects\vimsrc\vim7\src\screen.c @ 1768]
    0012fc0c 004f54be gvim!update_screen(int type = 10)+0x496
[d:\projects\vimsrc\vim7\src\screen.c @ 522]
    0012fc88 004f842c gvim!main_loop(int cmdwin = 0, int noexmode =
0)+0x24e [d:\projects\vimsrc\vim7\src\main.c @ 1109]
    0012fdcc 00573dc2 gvim!VimMain(void)+0xbbc
[d:\projects\vimsrc\vim7\src\main.c @ 942]
    0012fef0 0040af6c gvim!WinMain(struct HINSTANCE__ * hInstance =
0x769d4911, struct HINSTANCE__ * hPrevInst = 0x7ffd3000, char *
lpszCmdLine = 0x0012ffd4 "???", int nCmdShow = 1997857974)+0x92
[d:\projects\vimsrc\vim7\src\os_w32exe.c @ 131]
    0012ff88 769d4911 gvim!__tmainCRTStartup(void)+0x177
[f:\qfe\vctools\crt_bld\self_x86\crt\src\crt0.c @ 324]
    WARNING: Stack unwind information not available. Following frames
may be wrong.
    0012ff94 7714e4b6 kernel32!BaseThreadInitThunk+0x12
    0012ffd4 7714e489 ntdll!RtlInitializeExceptionChain+0x63
    0012ffec 00000000 ntdll!RtlInitializeExceptionChain+0x36

I don't have time to look into this further today.
--
/George V. Reilly  [email protected]
http://www.georgevreilly.com/blog  http://blogs.cozi.com/tech

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui