GNU bug report logs - #22146
Stack overflow in reftex-parse-all

Previous Next

Package: auctex;

Reported by: Nils Kanning <nils <at> kanning.de>

Date: Fri, 11 Dec 2015 21:19:02 UTC

Severity: normal

Done: Tassilo Horn <tsdh <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Mosè Giordano <mose <at> gnu.org>
To: Nils Kanning <nils <at> kanning.de>
Cc: 22146 <at> debbugs.gnu.org
Subject: bug#22146: Stack overflow in reftex-parse-all
Date: Sat, 12 Dec 2015 00:36:53 +0100
Hi Nils,

2015-12-11 22:03 GMT+01:00 Nils Kanning <nils <at> kanning.de>:
> Dear all,
>
> I encounter the error "Stack overflow in regexp matcher" if I apply the
> function reftex-parse-all to the following file:
>
> \documentclass{article}
> \begin{document}
> [\}
> foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
> ...
> foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo
> \end{document}
>
> Here ... stands for 500 copies of the line above. The file can be
> compiled successfully with pdflatex.
>
> I am using the Debian packages emacs24 24.5+1-3 and auctex 11.88-1.1.
> The same error also occurs with different versions.

We've recently released AUCTeX 11.89, you can grab it from ELPA ;-)

> In case you are wondering, the non-matching brackets [\} appear for
> example in physics as so-called "super Lie brackets".

Thanks for taking the time to report this bug, I can reproduce it.
The culprit is the

    (re-search-forward (reftex-everything-regexp) nil t)

within the `reftex-with-special-syntax' macro in
`reftex-parse-from-file' function.  Actually in the code it is called
as

    (re-search-forward regexp nil t)

I wrote the above line for ease of reproduction.

Of course `reftex-everything-regexp' is an undocumented function that
returns one of two undocumented variables.  I can reproduce the bug
only if `reftex-support-index' is non-nil, so in the end the culprit
is `reftex-everything-regexp'.

There is a simple workaround you can put in your code: close the
brackets, also in a comment is fine:

    [\} % ]

But I don't know how to really fix the bug, it's too late for me to
decrypt that regexp now.  Having a clue of what it should *exactly*
match would be of great help.

Bye,
Mosè




This bug report was last modified 9 years and 192 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.