Bug 100523

Summary: Segmentaion fault on particular regex
Product: [Retired] Red Hat Linux Reporter: David Dillow <dave>
Component: sedAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: 4.0.7-2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-08-04 07:41:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Dillow 2003-07-23 04:55:24 UTC
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 07:41:44 UTC
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.