[illumos-Developer] Webrev for bug 900: sed errors when -e is given a 0-length argument

Gary Mills mills at cc.umanitoba.ca
Wed Apr 27 17:24:02 PDT 2011


This is for illumos bug 900: sed errors when -e is given a 0-length
argument.  My webrev is at:

    http://cr.illumos.org/view/vl7thda0/illumos900/

It was tested under OI 148b.  Here's a comparison between the newly-
build sed and the installed one:

    $ echo foo | ./sed -e 's/oo/00/'
    f00
    $ echo foo | ./sed -e ''        
    foo
    $ echo foo | /usr/bin/sed -e 's/oo/00/'
    f00
    $ echo foo | /usr/bin/sed -e ''        
    sed: asprintf: Error 0

Here's the mercurial info:

    $ hg parent
    changeset:   13347:c8caa55a0b24
    tag:         tip
    user:        Gary Mills <mills at cc.umanitoba.ca>
    date:        Wed Apr 27 18:15:10 2011 -0500
    summary:     900 sed errors when -e is given a 0-length argument

It was fixed by reverting to the freebsd code for option handling.
This minimizes the changes needed to port it to Illumos.  While
`asprintf' is handy, it's only used in that one place in the sed
source.  There's no need to introduce it in this case.

-- 
-Gary Mills-        -Unix Group-        -Computer and Network Services-



More information about the Developer mailing list