Bug 100523 - Segmentaion fault on particular regex
Summary: Segmentaion fault on particular regex
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: sed
Version: 9
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-07-23 04:55 UTC by David Dillow
Modified: 2007-04-18 16:55 UTC (History)
0 users

Fixed In Version: 4.0.7-2
Clone Of:
Environment:
Last Closed: 2003-08-04 07:41:44 UTC
Embargoed:


Attachments (Terms of Use)

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.


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