GNU bug report logs - #19420
intermittent segfault using grep -P

Previous Next

Package: grep;

Reported by: "J.P. Hendrix" <bug-grep-gnu.org <at> linformatronics.nl>

Date: Sat, 20 Dec 2014 19:14:01 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

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: "J.P. Hendrix" <bug-grep-gnu.org <at> linformatronics.nl>
Subject: bug#19420: closed (Re: bug#19420: intermittent segfault using
 grep -P)
Date: Wed, 24 Nov 2021 03:04:02 +0000
[Message part 1 (text/plain, inline)]
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 19420 <at> debbugs.gnu.org.

-- 
19420: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19420
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: "J.P. Hendrix" <bug-grep-gnu.org <at> linformatronics.nl>
Cc: 19420-done <at> debbugs.gnu.org, Norihiro Tanaka <noritnk <at> kcn.ne.jp>
Subject: Re: bug#19420: intermittent segfault using grep -P
Date: Tue, 23 Nov 2021 19:03:08 -0800
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>.

[Message part 3 (message/rfc822, inline)]
From: "J.P. Hendrix" <bug-grep-gnu.org <at> linformatronics.nl>
To: bug-grep <at> gnu.org
Subject: intermittent segfault using grep -P
Date: Sat, 20 Dec 2014 10:55:24 +0100
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



This bug report was last modified 3 years and 176 days ago.

Previous Next


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