GNU bug report logs - #21688
25.0.50; abort in regex.c during "align"

Previous Next

Package: emacs;

Reported by: Ken Raeburn <raeburn <at> permabit.com>

Date: Thu, 15 Oct 2015 08:26:01 UTC

Severity: normal

Merged with 21802

Found in version 25.0.50

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 21688 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Ken Raeburn <raeburn <at> permabit.com>
Cc: 21688 <at> debbugs.gnu.org
Subject: Re: bug#21688: 25.0.50; abort in regex.c during "align"
Date: Sun, 25 Oct 2015 22:57:54 -0400
> I'm getting an abort in the regex code while doing an align operation on
> some perl code.  I've boiled down a test case to reproduce it to this:
[...]
> The abort at 6256 is in the switch statement after the "fail" label.
> Since "pat" is only three bytes into the buffer, the value branched on
> would've been two bytes in, a 1, which is the "succeed" enumerator,
> which isn't expected in that switch statement.

I think the issue is simply that syntax-propertization is now done
on-the-fly during regexp-matching and that this is wrong: the regexp
code is not re-entrant, so if syntax-propertization happens from
regexp-matching and performs regexp-matching itself we're likely to see
weird behaviors.

I think the fix is to make regexp.c use a new
UPDATE_SYNTAX_TABLE_FORWARD_FAST (which doesn't pay attention to
syntax-propertize--done) instead of UPDATE_SYNTAX_TABLE_FORWARD.


        Stefan




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

Previous Next


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