I can also reproduce this bug with the latest version of vim (vim-7.1.156)
which I downloaded from cvs and compiled from sources.

I move cursor from left to right over parenthese at line 89 (it's fine)
but when I move cursor from right to left over parenthese, vim
then takes 100% of CPU.  I waited several minutes, so it
looks like it's an endless loop (or something that would be
very slow!)

If I attached with gdb to the running process, I see the stack trace 
(quite deep) at given time (when it loops forever):

#0  0x0811cff4 in utf_ptr2char (p=0x82bf771 "\tfor i in $(qemu_bios_files); do 
\\") at mbyte.c:1377
#1  0x0815b428 in regmatch (scan=0x82a13d5 "\005") at regexp.c:3795
#2  0x0815b091 in regtry (prog=0x82a1380, col=0) at regexp.c:3599
#3  0x0815ae41 in vim_regexec_both (line=0x82bf771 "\tfor i in 
$(qemu_bios_files); do \\", col=0) at regexp.c:3469
#4  0x0815aa5b in vim_regexec_multi (rmp=0xbf8de7d4, win=0x822d208, 
buf=0x822e188, lnum=69, col=0) at regexp.c:3329
#5  0x0819cea9 in syn_regexec (rmp=0xbf8de7d4, lnum=69, col=0) at syntax.c:3098
#6  0x0819b3c6 in syn_current_attr (syncing=0, displaying=0, can_spell=0x0) at 
syntax.c:2000
#7  0x0819abf5 in syn_finish_line (syncing=0) at syntax.c:1694
#8  0x0819914e in syntax_start (wp=0x822d208, lnum=80) at syntax.c:565
#9  0x081a2536 in syn_get_id (wp=0x822d208, lnum=80, col=11, trans=0, 
spellp=0x0) at syntax.c:6101
#10 0x080870f5 in f_synID (argvars=0xbf8dead4, rettv=0xbf8deec4) at eval.c:15691
#11 0x0807b8b7 in call_func (name=0x82a0892 "synID", len=5, rettv=0xbf8deec4, 
argcount=3, argvars=0xbf8dead4, 
    firstline=80, lastline=80, doesrange=0xbf8debd8, evaluate=1, selfdict=0x0) 
at eval.c:7628
#12 0x0807b3ea in get_func_tv (name=0x82a0892 "synID", len=5, rettv=0xbf8deec4, 
arg=0xbf8def6c, firstline=80, 
    lastline=80, doesrange=0xbf8debd8, evaluate=1, selfdict=0x0) at eval.c:7446
#13 0x08077a77 in eval7 (arg=0xbf8def6c, rettv=0xbf8deec4, evaluate=1) at 
eval.c:4697
#14 0x080775ad in eval6 (arg=0xbf8def6c, rettv=0xbf8deec4, evaluate=1) at 
eval.c:4466
#15 0x080772ea in eval5 (arg=0xbf8def6c, rettv=0xbf8deec4, evaluate=1) at 
eval.c:4335
#16 0x08076a04 in eval4 (arg=0xbf8def6c, rettv=0xbf8deec4, evaluate=1) at 
eval.c:4067
#17 0x0807685c in eval3 (arg=0xbf8def6c, rettv=0xbf8deec4, evaluate=1) at 
eval.c:3979
#18 0x080766e8 in eval2 (arg=0xbf8def6c, rettv=0xbf8deec4, evaluate=1) at 
eval.c:3908
#19 0x0807651e in eval1 (arg=0xbf8def6c, rettv=0xbf8deec4, evaluate=1) at 
eval.c:3833
#20 0x0807b35a in get_func_tv (name=0x82a0888 "synIDattr(synID", len=9, 
rettv=0xbf8df2cc, arg=0xbf8df2a0, 
    firstline=80, lastline=80, doesrange=0xbf8defc8, evaluate=1, selfdict=0x0) 
at eval.c:7431
#21 0x08077a77 in eval7 (arg=0xbf8df2a0, rettv=0xbf8df2cc, evaluate=1) at 
eval.c:4697
#22 0x080775ad in eval6 (arg=0xbf8df2a0, rettv=0xbf8df2cc, evaluate=1) at 
eval.c:4466
#23 0x080772ea in eval5 (arg=0xbf8df2a0, rettv=0xbf8df2cc, evaluate=1) at 
eval.c:4335
#24 0x08076a04 in eval4 (arg=0xbf8df2a0, rettv=0xbf8df2cc, evaluate=1) at 
eval.c:4067
#25 0x0807685c in eval3 (arg=0xbf8df2a0, rettv=0xbf8df2cc, evaluate=1) at 
eval.c:3979
#26 0x080766e8 in eval2 (arg=0xbf8df2a0, rettv=0xbf8df2cc, evaluate=1) at 
eval.c:3908
#27 0x0807651e in eval1 (arg=0xbf8df2a0, rettv=0xbf8df2cc, evaluate=1) at 
eval.c:3833
#28 0x08076485 in eval0 (arg=0x82a0888 "synIDattr(synID", rettv=0xbf8df2cc, 
nextcmd=0x0, evaluate=1) at eval.c:3790
#29 0x08071fed in eval_to_bool (arg=0x82a0888 "synIDattr(synID", 
error=0xbf8df36c, nextcmd=0x0, skip=0) at eval.c:1150
#30 0x08084e00 in do_searchpair (spat=0x8296f88 "(", mpat=0x822f6e8 "", 
epat=0x824d0f8 ")", dir=-1, 
    skip=0x82a0888 "synIDattr(synID", flags=1, match_pos=0xbf8df484, 
lnum_stop=39) at eval.c:14316
#31 0x08084a04 in searchpair_cmn (argvars=0xbf8df574, match_pos=0xbf8df484) at 
eval.c:14188
#32 0x08084a8e in f_searchpairpos (argvars=0xbf8df574, rettv=0xbf8df98c) at 
eval.c:14225
#33 0x0807b8b7 in call_func (name=0x824d0c0 "searchpairpos", len=13, 
rettv=0xbf8df98c, argcount=6, 
    argvars=0xbf8df574, firstline=89, lastline=89, doesrange=0xbf8df678, 
evaluate=1, selfdict=0x0) at eval.c:7628
#34 0x0807b3ea in get_func_tv (name=0x824d0c0 "searchpairpos", len=13, 
rettv=0xbf8df98c, arg=0xbf8df950, 
    firstline=89, lastline=89, doesrange=0xbf8df678, evaluate=1, selfdict=0x0) 
at eval.c:7446
#35 0x08077a77 in eval7 (arg=0xbf8df950, rettv=0xbf8df98c, evaluate=1) at 
eval.c:4697
#36 0x080775ad in eval6 (arg=0xbf8df950, rettv=0xbf8df98c, evaluate=1) at 
eval.c:4466
#37 0x080772ea in eval5 (arg=0xbf8df950, rettv=0xbf8df98c, evaluate=1) at 
eval.c:4335
#38 0x08076a04 in eval4 (arg=0xbf8df950, rettv=0xbf8df98c, evaluate=1) at 
eval.c:4067
#39 0x0807685c in eval3 (arg=0xbf8df950, rettv=0xbf8df98c, evaluate=1) at 
eval.c:3979
#40 0x080766e8 in eval2 (arg=0xbf8df950, rettv=0xbf8df98c, evaluate=1) at 
eval.c:3908
#41 0x0807651e in eval1 (arg=0xbf8df950, rettv=0xbf8df98c, evaluate=1) at 
eval.c:3833
#42 0x08076485 in eval0 (arg=0x824d0c0 "searchpairpos", rettv=0xbf8df98c, 
nextcmd=0xbf8dfa14, evaluate=1)
    at eval.c:3790
#43 0x08072cc8 in ex_let (eap=0xbf8dfa10) at eval.c:1746
#44 0x080a5117 in do_one_cmd (cmdlinep=0xbf8dfb78, sourcing=1, 
cstack=0xbf8dfbd4, fgetline=0x808f828 <get_func_line>, 
    cookie=0xbf8dff2c) at ex_docmd.c:2621
#45 0x080a2967 in do_cmdline (cmdline=0x0, getline=0x808f828 <get_func_line>, 
cookie=0xbf8dff2c, flags=7)
    at ex_docmd.c:1099
#46 0x0808f04b in call_user_func (fp=0x829c450, argcount=0, argvars=0xbf8e0704, 
rettv=0xbf8e0814, firstline=89, 
    lastline=89, selfdict=0x0) at eval.c:20289
#47 0x0807b7bf in call_func (name=0x82bfe30 "\200�P9_Highlight_Matching_Pair", 
len=28, rettv=0xbf8e0814, argcount=0, 
    argvars=0xbf8e0704, firstline=89, lastline=89, doesrange=0xbf8e081c, 
evaluate=1, selfdict=0x0) at eval.c:7599
#48 0x0807b3ea in get_func_tv (name=0x82bfe30 
"\200�P9_Highlight_Matching_Pair", len=28, rettv=0xbf8e0814, 
    arg=0xbf8e0824, firstline=89, lastline=89, doesrange=0xbf8e081c, 
evaluate=1, selfdict=0x0) at eval.c:7446
#49 0x080755cf in ex_call (eap=0xbf8e08a0) at eval.c:3213
#50 0x080a5117 in do_one_cmd (cmdlinep=0xbf8e0a08, sourcing=1, 
cstack=0xbf8e0a64, fgetline=0x80cbc87 <getnextac>, 
    cookie=0xbf8e0d98) at ex_docmd.c:2621
#51 0x080a2967 in do_cmdline (cmdline=0x0, getline=0x80cbc87 <getnextac>, 
cookie=0xbf8e0d98, flags=7)
    at ex_docmd.c:1099
#52 0x080cb849 in apply_autocmds_group (event=EVENT_CURSORMOVED, 
fname=0x82bfc80 "/home/pel/vim_testcase", 
    fname_io=0x0, force=0, group=-3, buf=0x822e188, eap=0x0) at fileio.c:8722
#53 0x080cb279 in apply_autocmds (event=EVENT_CURSORMOVED, fname=0x0, 
fname_io=0x0, force=0, buf=0x822e188)
    at fileio.c:8340
#54 0x080e5079 in main_loop (cmdwin=0, noexmode=0) at main.c:1064
#55 0x080e4dc2 in main (argc=2, argv=0xbf8e1054) at main.c:940


No clear idea why it happens though.

-- 
Vim locks up while editing a specific file (file attached)
https://bugs.launchpad.net/bugs/68960
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to