64922Re: vimgrep fails when 'autochdir' is set
- Apr 25, 2012Benjamin Fritz wrote in February:
> Updated patch attached to fix that 'autochdir' causes :vimgrep toRunning out of stack space usually causes a nasty crash. Can't even
> fail, based on 7.3.421. I did have one more question: I noticed that
> the pre-existing code dynamically allocates memory of static size
> MAXPATHL for both dirname_start and dirname_now. I have kept this and
> done the same thing for the restore_start_dir function I added, but I
> wonder, is there a reason the path string cannot be stack-allocated
> instead? Is it to limit stack size or something, since MAXPATHL can be
> somewhat large?
save the swap file then, unless the system supports a signal stack.
Therefore Vim avoids putting large buffers on the stack. MAXPATHL is
often 4000 or 8000 bytes, which is quite a lot. Especially when doing
it in many places.
MONK: ... and the Lord spake, saying, "First shalt thou take out the Holy Pin,
then shalt thou count to three, no more, no less. Three shalt be the
number thou shalt count, and the number of the counting shalt be three.
Four shalt thou not count, neither count thou two, excepting that thou
then proceed to three. Five is right out. Once the number three, being
the third number, be reached, then lobbest thou thy Holy Hand Grenade of
Antioch towards thou foe, who being naughty in my sight, shall snuff it.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.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
- << Previous post in topic Next post in topic >>