Subject: Re: bug#28329: 25.2; Eshell: 40M+ output: Stack overflow in regexp matcher

From: Noam Postavsky <[email-masked]>
Date: Sun, 05 Nov 2017 09:44:42 -0500

Pierre Neidhardt <[email-masked]> writes:

> That being said, no issue doing that.  So the output "saved after the
> fact" does not seem to produce the issue.

Damn.  I guess the chunking is significant too.  Could you try saving
the output chunks, with this:

    (defvar eshell-chunk-number 0)
    (defconst eshell-output-chunk-dir "eshell-output")
    (make-directory eshell-output-chunk-dir t)

    (defun catch-eshell-output-chunk ()
      (write-region eshell-last-output-block-begin
                    eshell-last-output-end
                    (format "%s/chunk.%d"
                            eshell-output-chunk-dir
                            eshell-chunk-number)
                    nil :quiet)
      (setq eshell-chunk-number (1+ eshell-chunk-number)))

    (add-hook 'eshell-output-filter-functions
              'catch-eshell-output-chunk)

And then afterwards 'cat eshell-output/chunk.*' should hopefully
reproduce it?