Subject: bug#9234: 23.3; Long lines in compilation output cause stack overflow in regexp matcher

From: Gareth Rees <[email-masked]>
Date: Thu, 4 Aug 2011 01:24:23 +0100

In a fresh emacs -Q, type

    M-x compile RET for X in {1..100000}; do echo -n 1; done RET

The following message appears in the echo area:

    error in process filter: Stack overflow in regexp matcher

With debug-on-error turned on, I get the following backtrace:

Debugger entered--Lisp error: (error "Stack overflow in regexp matcher")
  re-search-forward("^ *\\([^ \n]+\\)(\\([0-9]+\\)): \\(?:error\\|warnin\\(g\\)\\|remar\\(k\\)\\)" 34233 t)
  font-lock-fontify-keywords-region(194 34233 nil)
  font-lock-default-fontify-region(33209 34233 nil)
  font-lock-fontify-region(33209 34233)
  font-lock-after-change-function(33209 34233 0)
  compilation-filter(#<process compilation> "1111111...1111111")

-- 
Gareth Rees

In GNU Emacs 23.3.1 (x86_64-apple-darwin, NS apple-appkit-1038.35)
of 2011-03-10 on black.porkrind.org
Windowing system distributor `Apple', version 10.3.1138
configured using `configure  '--host=x86_64-apple-darwin' '--build=i686-apple-darwin' '--with-ns' 'build_alias=i686-apple-darwin' 'host_alias=x86_64-apple-darwin' 'CC=gcc -mmacosx-version-min=10.5''