GNU bug report logs - #77800
grep-3.12: write-error-msg test failure on fedora rawhide (f43)

Previous Next

Package: grep;

Reported by: Jaroslav Škarvada <jskarvad <at> redhat.com>

Date: Mon, 14 Apr 2025 12:56:01 UTC

Severity: normal

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


Message #50 received at 77800 <at> debbugs.gnu.org (full text, mbox):

From: Grisha Levit <grishalevit <at> gmail.com>
To: Jim Meyering <jim <at> meyering.net>
Cc: jackson <at> fastmail.fm,
 Jaroslav Škarvada <jskarvad <at> redhat.com>,
 "bug-gnulib <at> gnu.org List" <bug-gnulib <at> gnu.org>,
 Paul Eggert <eggert <at> cs.ucla.edu>, 77800 <at> debbugs.gnu.org
Subject: Re: bug#77800: grep-3.12: write-error-msg test failure on fedora
 rawhide (f43)
Date: Fri, 18 Apr 2025 02:15:37 -0400
On Fri, Apr 18, 2025 at 1:51 AM Jim Meyering <jim <at> meyering.net> wrote:
>
> Surprised to find that coreutils-9.5 (fedora 41 stock) works fine:
>
>   $ { /bin/printf %4095s; /bin/printf %4096s; } > /dev/full
>   /bin/printf: write error: No space left on device
>   /bin/printf: write error: No space left on device

Though OTOH (not sure why):

    $ { /bin/printf %4096s; /bin/printf %4097s; } > /dev/full
    /bin/printf: write error: No space left on device
    /bin/printf: write error

----

But I'm concerned that with this change because programs where:

    1. errno is set by a failed (unchecked) write
    2. errno is then set by some unrelated function
    3. close_stdout() is arranged to run atexit
    4. when close_stream() calls fclose() it does not fail

will now erroneously report the error from the unrelated function
when running close_stdout.

Previously:

    $ stdbuf -oL realpath -e . xxx >/dev/full
    realpath: xxx: No such file or directory
    realpath: write error

After the patch:

    $ stdbuf -oL src/realpath -e . xxx >/dev/full
    realpath: xxx: No such file or directory
    realpath: write error: No such file or directory




This bug report was last modified 7 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.