GNU bug report logs -
#21513
assertion error in pop_fail_stack
Previous Next
Reported by: Hanno Böck <hanno <at> hboeck.de>
Date: Fri, 18 Sep 2015 16:38:02 UTC
Severity: normal
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#21513: assertion error in pop_fail_stack
which was filed against the grep package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 21513 <at> debbugs.gnu.org.
--
21513: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=21513
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
On 1/20/20 2:49 AM, Martin Liška wrote:
>
> In this case an infinite loop is highly undesirable.
Sure, but the regex code is littered with highly undesirable code like this, as
it's easy to use a weird regexp to make the code explode exponentially and
there's little practical difference between that an infinite loop.
Come to think of it, the grep test infrastructure already has a way to deal with
this sort of thing, so all we need to do to fix this particular glitch is adjust
triple-backref to use timeout, which I did by installing the attached patch.
Thanks Andreas for diagnosing the problem. I hope there's a gcc bug report about
it somewhere. I could not use Martin's recipe on Fedora 31 x86-64 because gcc
-m32 -flto didn't look inside the .a files that the grep build procedure creates
and uses. I've never had much luck with -flto anyway as it has a habit of
running into compiler bugs. I now also see that Red Hat has qualms about the
GOLD linker <https://fedoraproject.org/wiki/Changes/BINUTILS_GOLD> which the
recipe relies on, as Google has decided not to continue GOLD development (which
was news to me).
I'll mark Bug#21513 as done again, since the original report is fixed. The
triple-backref bug is Bug#22793 and also glibc bug 11053, both of which are
still open.
[0001-tests-work-around-GCC-fprofile-generate-bug.patch (text/x-patch, attachment)]
[Message part 5 (message/rfc822, inline)]
[Message part 6 (text/plain, inline)]
Hi,
This command
grep -E '0|()0|\1|0'
will cause an assert error:
grep: regexec.c:1401: pop_fail_stack: Assertion `num >= 0' failed.
Happens both in the latest release (2.21) and the latest git code.
(this was found with american fuzzy lop)
cu,
--
Hanno Böck
http://hboeck.de/
mail/jabber: hanno <at> hboeck.de
GPG: BBB51E42
[Message part 7 (application/pgp-signature, inline)]
This bug report was last modified 5 years and 175 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.