GNU bug report logs - #27838
grep error: "regexec.c:1375: pop_fail_stack: Assertion `num >= 0' failed."

Previous Next

Package: coreutils;

Reported by: Jacek Wielemborek <d33tah <at> gmail.com>

Date: Wed, 26 Jul 2017 14:54:02 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 27838 in the body.
You can then email your comments to 27838 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#27838; Package coreutils. (Wed, 26 Jul 2017 14:54:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jacek Wielemborek <d33tah <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Wed, 26 Jul 2017 14:54:02 GMT) Full text and rfc822 format available.

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

From: Jacek Wielemborek <d33tah <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: grep error: "regexec.c:1375: pop_fail_stack: Assertion `num >= 0'
 failed."
Date: Wed, 26 Jul 2017 16:53:07 +0200
Hi,

Try out the following test case, IIRC found with the aid of afl-fuzz:

grep -E -f <( echo
'fzJ7fymOjgqOjgkfMnt/KSgfVzN8pFyQKR8zfGR7pGuQKR8zfCh8Mnt/KSgfVzN8pFyQKR8zfGR7pGuQKR8zfGR7kCkoCx8zfDJ7fymOrQmOjgkfM3wkXDI='
| base64 -d ) /dev/null
grep: regexec.c:1375: pop_fail_stack: Assertion `num >= 0' failed.

I reported it once as on Fedora's Bugzilla, but got no reaction - in
that case it even triggered a segmentation fault.

Cheers,
d33tah




Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Wed, 26 Jul 2017 16:26:02 GMT) Full text and rfc822 format available.

Notification sent to Jacek Wielemborek <d33tah <at> gmail.com>:
bug acknowledged by developer. (Wed, 26 Jul 2017 16:26:03 GMT) Full text and rfc822 format available.

Message #10 received at 27838-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Jacek Wielemborek <d33tah <at> gmail.com>, 27838-done <at> debbugs.gnu.org
Subject: Re: bug#27838: grep error: "regexec.c:1375: pop_fail_stack: Assertion
 `num >= 0' failed."
Date: Wed, 26 Jul 2017 09:24:59 -0700
[Message part 1 (text/plain, inline)]
Thanks, that is due to an already known bug in glibc; see:

https://sourceware.org/bugzilla/show_bug.cgi?id=18986
https://debbugs.gnu.org/21513

To work around the problem with grep, use './configure --with-included-regex' 
when building grep, or encourage your upstream distributor to do so (or better 
yet, to fix glibc). You might also follow up on the glibc bug report to mention 
that the problem affects you too.

In the meantime I installed the attached patch, to add your test case to grep's 
test suite. The test is expected to fail if glibc regex is used.
[0001-tests-add-Bug-27838-test-case.patch (text/x-patch, attachment)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 24 Aug 2017 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 305 days ago.

Previous Next


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