Bug 100523 - Segmentaion fault on particular regex
Segmentaion fault on particular regex
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: sed (Show other bugs)
9
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-07-23 00:55 EDT by David Dillow
Modified: 2007-04-18 12:55 EDT (History)
0 users

See Also:
Fixed In Version: 4.0.7-2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-08-04 03:41:44 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description David Dillow 2003-07-23 00:55:24 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.7 (X11; Linux i686; U;) Gecko/20030131

Description of problem:
The following command will cause sed to segfault:

echo 'scripts/Makefile.lib 1.20: 238 lines' | sed -re 's/^(.*)+
[[:digit:]]+\.[[:digit:]]+: [[:digit:]]+ lines/\1/'

If you remove the first + sign (after the close parenthesis), it works fine.

Version-Release number of selected component (if applicable):
sed-4.0.5-1

How reproducible:
Always

Steps to Reproduce:
1. Run the above command
2.
3.
    

Actual Results:  Segmentation fault

Additional info:
Comment 1 Jakub Jelinek 2003-08-04 03:41:44 EDT
Works for me with sed-4.0.7-{2,3} and glibc-2.3.2-6{3,6}.
Though with the + there I'm not sure if it gives you exactly what you wanted,
particularly that \1 is empty string.

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