Subject: bug#19420: closed (Re: bug#19420: intermittent segfault using grep -P)

From: [email-masked] (GNU bug Tracking System)
Date: Wed, 24 Nov 2021 03:04:02 +0000

Your bug report

#19420: intermittent segfault using grep -P

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 [email-masked].

-- 
19420: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19420
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#19420: intermittent segfault using grep -P
From: Paul Eggert <[email-masked]>
To: "J.P. Hendrix" <[email-masked]>
Cc: [email-masked], Norihiro Tanaka <[email-masked]>
Date: Tue, 23 Nov 2021 19:03:08 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

I'm closing this old Grep bug report, on two grounds:

* I can no longer reproduce the the problem on Fedora 35 x86-64, using 
Norihiro Tanaka's test case <https://bugs.gnu.org/19420#20>. This 
suggests the PCRE library has been fixed.

* GNU Grep has switched to PCRE2, so PCRE bugs shouldn't matter now. See 
<https://bugs.gnu.org/47264>.

Subject: intermittent segfault using grep -P
From: "J.P. Hendrix" <[email-masked]>
To: [email-masked]
Date: Sat, 20 Dec 2014 10:55:24 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

When using the following command, *most* of the time I get a 
Segmentation fault (10 out of 16 times):

€ cat grepTxt | grep -P 'b(?:(?!tom).)+'
Segmentation fault (core dumped)

This happens with the  grep version that came with my Linux installation:

€ grep -V
grep (GNU grep) 2.16

I am on:

NAME="Ubuntu"
VERSION="14.04.1 LTS, Trusty Tahr"

But also compiled grep from sources 
(http://ftp.gnu.org/gnu/grep/grep-2.21.tar.xz) with the same problem.

libpcre3:amd64; libpcre3:i386; libpcre3-dev:amd64; libpcrecpp0:amd64 are 
all 1:8.31-2ubuntu2

I tried to reduce the regex and the text as much as possible to still 
reproduce the issue most of the time, unfortunately the text is still 
16893 bytes long. As I don't know if it is OK to attach such a long 
file, I put it on pastebin, but will expire in a month.

http://pastebin.com/download.php?i=jsHskMAA

Please advise.

Kind regards,

JP