Bug 157964 - Grep "Segmentation fault" using Perl regular expression
Summary: Grep "Segmentation fault" using Perl regular expression
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: grep
Version: 3
Hardware: i686
OS: Linux
medium
low
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Mike McLean
URL:
Whiteboard:
: 161845 161896 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-05-17 14:27 UTC by Robert Jackson
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2005-05-19 12:02:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Robert Jackson 2005-05-17 14:27:22 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.7) Gecko/20050416 Fedora/1.0.3-1.3.1 Firefox/1.0.3

Description of problem:
I was using grep with a Perl regular expression to find files containing blank lines, but with some whitespace (i.e. a tab or a space).

One file (from about 20) caused grep to Segmentation fault.  This file was unique from the others since the last line was empty (i.e. it has an additional newline at the end).

I found that creating a file with a single newline caused the same Segmentation fault.

Version-Release number of selected component (if applicable):
grep-2.5.1-7.8

How reproducible:
Always

Steps to Reproduce:
1. echo "\n" > temp.txt
2. grep -P '^\s+$' temp.txt


Actual Results:  Segmentation fault

Expected Results:  No Segmentation fault


Additional info:

I tried the same command on serveral different Ferdora platforms, and all give the same Segmentation fault.  Specifically:

RedHat Linux 9 (i686)
Fedora Core 1 (i686)
Fedora Core 3 (i686)
Fedora Core 3 (x86_64)

Comment 1 Tim Waugh 2005-05-19 12:02:14 UTC
I think this is something that has been addressed upstream, and which the next
GNU grep release will fix.

Comment 2 Tim Waugh 2005-06-28 08:16:59 UTC
*** Bug 161845 has been marked as a duplicate of this bug. ***

Comment 3 Tim Waugh 2005-06-28 09:36:42 UTC
*** Bug 161896 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.