[illumos-Advocates] Fwd: RTI for: 900 sed errors when -e is given a 0-length argument

Gordon Ross gordon.w.ross at gmail.com
Sun May 1 19:30:27 PDT 2011


FYI, I don't like when people add copyright lines for trivially small changes.
But I don't think we can prevent it if someone really wants one.


---------- Forwarded message ----------
From: Gordon Ross <gordon.w.ross at gmail.com>
Date: Sun, May 1, 2011 at 10:23 PM
Subject: Re: [illumos-Advocates] RTI for: 900 sed errors when -e is
given a 0-length argument
To: Gary Mills <mills at cc.umanitoba.ca>


Gary,

One thing I meant to ask you:

Do you sure you want to add a copyright line for this change?
Your name would be shown as the author in the commit, so
you'd get credit for the work in any case.

Adding copyrights for small changes can make one seem a
bit greedy.  Not sure if you were aware of that.

Just to be clear, I'm not directing you either way, just
trying to make you aware how that may be perceived.

Thanks,
Gordon


On Sat, Apr 30, 2011 at 2:15 PM, Gary Mills <mills at cc.umanitoba.ca> wrote:
> I've attached the `hg export' file for this bug.
>
> Here's `hg outgoing -v' output:
>
>    running ssh anonhg at hg.illumos.org "hg -R illumos-gate serve --stdio"
>    remote: Not trusting file /export/illumos/hgrepos/illumos-gate/.hg/hgrc from untrusted user hg, group hg
>    comparing with ssh://anonhg@hg.illumos.org/illumos-gate
>    searching for changes
>    changeset:   13347:0565ff69c6b9
>    tag:         tip
>    user:        Gary Mills <mills at cc.umanitoba.ca>
>    date:        Thu Apr 28 12:40:06 2011 -0500
>    files:       usr/src/cmd/sed/main.c
>    description:
>    900 sed errors when -e is given a 0-length argument
>
>
>    remote: Not trusting file /export/illumos/hgrepos/illumos-gate/.hg/hgrc from untrusted user hg, group hg
>
> `hg pbchk' is clean.
>
> I didn't use `nightly' to build `sed' although I'm trying to run it
> now.  Here's how I built it:
>
>    $ bldenv ~/Downloads/code/illumos-gate/illumos.sh 'make'
>    Build type   is  non-DEBUG
>    RELEASE      is
>    VERSION      is illumos-gate
>    RELEASE_DATE is April 2011
>
>    The top-level 'setup' target is available to build headers and tools.
>
>    Using /bin/ksh as shell.
>    /opt/onbld/bin/i386/cw -_cc -O  -xspace -Xa  -xildoff -errtags=yes -errwarn=%all -erroff=E_EMPTY_TRANSLATION_UNIT -erroff=E_STATEMENT_NOT_REACHED -xc99=%none    -W0,-xglobalstatic -v -DTEXT_DOMAIN=\"SUNW_OST_OSCMD\" -D_TS_ERRNO  -I/home/mills/Downloads/code/illumos-gate/proto/root_i386-nd/usr/include    -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c  main.c
>    + /usr/sfw/bin/gcc -fident -finline -fno-inline-functions -fno-builtin -fno-asm -nodefaultlibs -D__sun -O -Wall -Wno-unknown-pragmas -Wno-missing-braces -Wno-sign-compare -Wno-parentheses -Wno-uninitialized -Wno-implicit-function-declaration -Wno-unused -Wno-trigraphs -Wno-char-subscripts -Wno-switch -Werror -std=gnu89 -DTEXT_DOMAIN="SUNW_OST_OSCMD" -D_TS_ERRNO -I/home/mills/Downloads/code/illumos-gate/proto/root_i386-nd/usr/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c main.c -o /tmp/.cwCAAjZayXh.o
>    + /opt/SUNWspro/bin/cc -O -xspace -Xa -xildoff -errtags=yes -errwarn=%all -erroff=E_EMPTY_TRANSLATION_UNIT -erroff=E_STATEMENT_NOT_REACHED -xc99=%none -W0,-xglobalstatic -v -DTEXT_DOMAIN="SUNW_OST_OSCMD" -D_TS_ERRNO -I/home/mills/Downloads/code/illumos-gate/proto/root_i386-nd/usr/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -c main.c
>    /opt/onbld/bin/i386/cw -_cc -O  -xspace -Xa  -xildoff -errtags=yes -errwarn=%all -erroff=E_EMPTY_TRANSLATION_UNIT -erroff=E_STATEMENT_NOT_REACHED -xc99=%none    -W0,-xglobalstatic -v -DTEXT_DOMAIN=\"SUNW_OST_OSCMD\" -D_TS_ERRNO  -I/home/mills/Downloads/code/illumos-gate/proto/root_i386-nd/usr/include    -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Bdirect     -M/home/mills/Downloads/code/illumos-gate/usr/src/common/mapfiles/common/map.noexstk -M/home/mills/Downloads/code/illumos-gate/usr/src/common/mapfiles/common/map.pagealign -M/home/mills/Downloads/code/illumos-gate/usr/src/common/mapfiles/common/map.noexdata main.o compile.o misc.o process.o -o sed -L/home/mills/Downloads/code/illumos-gate/proto/root_i386-nd/lib -L/home/mills/Downloads/code/illumos-gate/proto/root_i386-nd/usr/lib
>    + /opt/SUNWspro/bin/cc -O -xspace -Xa -xildoff -errtags=yes -errwarn=%all -erroff=E_EMPTY_TRANSLATION_UNIT -erroff=E_STATEMENT_NOT_REACHED -xc99=%none -W0,-xglobalstatic -v -DTEXT_DOMAIN="SUNW_OST_OSCMD" -D_TS_ERRNO -I/home/mills/Downloads/code/illumos-gate/proto/root_i386-nd/usr/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Bdirect -M/home/mills/Downloads/code/illumos-gate/usr/src/common/mapfiles/common/map.noexstk -M/home/mills/Downloads/code/illumos-gate/usr/src/common/mapfiles/common/map.pagealign -M/home/mills/Downloads/code/illumos-gate/usr/src/common/mapfiles/common/map.noexdata main.o compile.o misc.o process.o -o sed -L/home/mills/Downloads/code/illumos-gate/proto/root_i386-nd/lib -L/home/mills/Downloads/code/illumos-gate/proto/root_i386-nd/usr/lib
>    $ bldenv ~/Downloads/code/illumos-gate/illumos.sh 'make lint'
>    Build type   is  non-DEBUG
>    RELEASE      is
>    VERSION      is illumos-gate
>    RELEASE_DATE is April 2011
>
>    The top-level 'setup' target is available to build headers and tools.
>
>    Using /bin/ksh as shell.
>    /opt/sunstudio12.1/bin/lint -I/opt/SUNWspro/prod/include/lint -axsm -DTEXT_DOMAIN=\"SUNW_OST_OSCMD\" -D_TS_ERRNO  -I/home/mills/Downloads/code/illumos-gate/proto/root_i386-nd/usr/include    -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -errtags=yes -s -erroff=E_PTRDIFF_OVERFLOW -erroff=E_ASSIGN_NARROW_CONV -U__PRAGMA_REDEFINE_EXTNAME -Xc99=%none -errsecurity=core -erroff=E_SEC_CREAT_WITHOUT_EXCL -erroff=E_SEC_FORBIDDEN_WARN_CREAT -erroff=E_ASSIGN_INT_TO_SMALL_INT -erroff=E_CAST_INT_CONST_TO_SMALL_INT -erroff=E_CAST_INT_TO_SMALL_INT -erroff=E_CAST_TO_PTR_FROM_INT -erroff=E_COMP_INT_WITH_LARGE_INT -erroff=E_INTEGRAL_CONST_EXP_EXPECTED -erroff=E_PASS_INT_TO_SMALL_INT -erroff=E_PTR_CONV_LOSES_BITS main.c compile.c misc.c process.c -L/home/mills/Downloads/code/illumos-gate/proto/root_i386-nd/lib -L/home/mills/Downloads/code/illumos-gate/proto/root_i386-nd/usr/lib
>    main.c:
>    compile.c:
>    misc.c:
>    process.c:
>
> Here's the behavior of illumos sed as I built it without the fix:
>
>    $ echo foo | ./sed -e 's/oo/00/'
>    f00
>    $ echo foo | ./sed -e ''
>    sed: asprintf: Error 0
>    $ echo foo | ./sed ''
>    foo
>
> This is after the fix:
>
>    $ echo foo | ./sed -e 's/oo/00/'
>    f00
>    $ echo foo | ./sed -e ''
>    foo
>    $ echo foo | ./sed ''
>    foo
>
> --
> -Gary Mills-        -Unix Group-        -Computer and Network Services-
>
> _______________________________________________
> Advocates mailing list
> Advocates at lists.illumos.org
> http://lists.illumos.org/m/listinfo/advocates
>
>



More information about the Advocates mailing list