Bram Moolenaar wrote: > Dominique Pelle wrote: > >> In the todo list, I see this crash which was reported about 1 year ago: >> >> --- 8< --- cut here --- 8< --- cut here --- 8< --- >> >> Reproducible crash in syntax HL. (George Reilly, Dominique Pelle, 2009 May 9) >> >> --- 8< --- cut here --- 8< --- cut here --- 8< --- ...snip... >> Attached patch fixes by making sp->sst_stacksize an int >> rather than short. Making it an "unsigned short" is also >> enough to make it work. But the value 50855 is too >> dangerously close to 65536 so an int is safer. ...snip... > > I'm glad you managed to find and fix this problem. > > I wonder if we should limit the stacksize. If it has this many items it > must be very slow. But that may lead to weird syntax HL errors, thus we > can't simply add a limit.
I'd rather not put an arbitrary limit. What is slow today may be fast tomorrow. I was testing with an old laptop and with Vim compiled without optimizations. So above test case may already be fast enough on a recent machine with optimized vim. Anyway, while Vim is busy computing syntax HL, it's possible to press CTRL-C to interrupt it. So that's quite acceptable as it is. Thanks for applying the patch (7.2.436). -- 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