Subject: Re: bug#21135: Exception: STATUS_STACK_OVERFLOW at rip=001801C6536

From: Jim Meyering <[email-masked]>
Date: Thu, 30 Jul 2015 14:24:15 -0700

On Sun, Jul 26, 2015 at 8:58 AM, AJ Lowell <[email-masked]> wrote:
> version:           grep (GNU grep) 2.21
>
> command line:      grep -A 1 -B 1 -e "build " -E -i -r *
>
> error message:     5718 [main] grep 6880
> cygwin_exception::open_stackdumpfile: Dumping stack trace to
> grep.exe.stackdump
>
> stack dump:        <see attachment>
>
> root directory:    617098 files, combined size 17721863057B
>
>
> Directory listing (~20MB compressed) and directory contents (4+ GB
> compressed) available if needed.

Thank you for the report.
A general guideline: when using grep's -r option, there is usually no
need to use "*" to select all (non-hidden) files in a directory.
Instead specify only the directory name (here, "." for current
directory) and no "*", and let grep recursively traverse its
subdirectories. If your use of "*" was intended to expand to a listing
of 617,098 files, I'm not surprised that something went wrong. That
command-line length would typically exceed the maximum allowed on most
systems.

I.e., does the problem still arise with this command?

  grep -A 1 -B 1 -e "build " -E -i -r .