Bug 113939 - numbered match bug
Summary: numbered match bug
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: sed
Version: 9
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-01-20 14:44 UTC by SEKINE Tatsuo
Modified: 2007-04-18 17:01 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-06-10 13:57:10 UTC
Embargoed:


Attachments (Terms of Use)

Description SEKINE Tatsuo 2004-01-20 14:44:09 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; ja-JP; rv:1.2.1)
Gecko/20030225

Description of problem:
GNU sed ver. 4.x-4.0.6 have bugs of numbered match substitution.


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

How reproducible:
Always

Steps to Reproduce:
1.     echo "x" | sed -n 's/x/SUBST/2p'

Actual Results:  Substitution is not occured.
But the pattern space is "p"rinted as follows:

[prompt]$ echo "x" | sed -n 's/x/SUBST/2p'
x
[prompt]$

Expected Results:  Substitution is not occured, and the patten space
is not printed.

[prompt]$ echo "x" | sed -n 's/x/SUBST/2p'
[prompt]$


Additional info:

This problem was fixed by 4.0.7 release.
From Changelog of 4.0.9 release:

2003-03-23  Paolo Bonzini  <bonzini>

        * sed/execute.c (do_subst): fix several bugs with
        numbered matches
        * testsuite/numsub2.good, testsuite/numsub2.inp,
        testsuite/numsub2.sed, testsuite/numsub3.good,
        testsuite/numsub3.inp, testsuite/numsub3.sed,
        testsuite/numsub4.good, testsuite/numsub4.inp,
        testsuite/numsub4.sed, testsuite/numsub5.good,
        testsuite/numsub5.inp, testsuite/numsub5.sed:
        regression tests for the bugs

Comment 1 SEKINE Tatsuo 2004-06-10 13:57:10 UTC
RH9 is obsolete now, and this bug is fixed on FC2.



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