Peter Odding <peter <at> peterodding.com> writes: > > The regex is a 77 KB monstrosity that's supposed to match a predefined > set of strings in 2html.vim output and is complicated by the fact that > it also matches strings with embedded HTML tags. The regex is corrupt > because of a bug in my plug-in; I forgot to escape special characters > like [.
I can reproduce the same crash with a much simpler, valid, very long regex: a\|a\|a\|... $ vim -Ngfu NONE --noplugin -c "execute '/' . repeat('a\|', 9000) . 'a'" Vim: Caught deadly signal SEGV On my system, it crashes with 9000 repetitions but not 8000. > I'm also attaching a backtrace from GDB and the output of Valgrind, > which tell me that Vim crashes because of a NULL pointer dereference at > regexp.c:4730 in the latest Vim 7.3 source. I've tried reasoning about > this but regmatch() is far too complex for my comprehension at the > moment gdb shows the same backtrace as yours: (gdb) bt #0 0x000000000055a545 in regmatch (scan=0x953cba "\003") at regexp.c:4730 #1 0x0000000000557dd5 in regtry (prog=0x953ca0, col=0) at regexp.c:3711 #2 0x0000000000557b9c in vim_regexec_both (line=0xab3f30 "", col=0, tm=0x0) at regexp.c:3600 #3 0x00000000005574c7 in vim_regexec (rmp=0x7fffffffdd00, line=0xab3f30 "", col=0) at regexp.c:3347 #4 0x00000000004b85cd in match_file_pat (pattern=0x0, prog=0x953ca0, fname=0xab3f30 "", sfname=0x0, tail= 0xab3f30 "", allow_dirs=0) at fileio.c:10003 #5 0x00000000004b7bd2 in auto_next_pat (apc=0x7fffffffde50, stop_at_last=0) at fileio.c:9525 #6 0x00000000004b77d8 in apply_autocmds_group (event=EVENT_VIMENTER, fname=0xab3f30 "", fname_io=0x0, force=0, group=-3, buf=0x88c150, eap=0x0) at fileio.c:9358 #7 0x00000000004b7108 in apply_autocmds (event=EVENT_VIMENTER, fname=0x0, fname_io=0x0, force=0, buf=0x88c150) at fileio.c:8994 #8 0x00000000004d3973 in main (argc=6, argv=0x7fffffffe1e8) at main.c:903 Carlo -- 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