GNU bug report logs - #8154
du: issue with `--files0-from=DIR'

Previous Next

Package: coreutils;

Reported by: Stefan Vargyas <stvar <at> yahoo.com>

Date: Wed, 2 Mar 2011 14:23:01 UTC

Severity: normal

Fixed in version 8.11

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eric Blake <eblake <at> redhat.com>
To: Stefan Vargyas <stvar <at> yahoo.com>
Cc: 8154 <at> debbugs.gnu.org, bug-gnulib <bug-gnulib <at> gnu.org>
Subject: bug#8154: du: issue with `--files0-from=DIR'
Date: Wed, 02 Mar 2011 07:46:21 -0700
[Message part 1 (text/plain, inline)]
[adding bug-gnulib]

On 03/02/2011 06:28 AM, Stefan Vargyas wrote:
> Dear maintainers,
> 
> While building and running coreutils v8.9, I came across the following issue of 'du':
> 
>   $ mkdir /tmp/foo
>   $ du --files0-from=/tmp/foo
>   du: `/tmp/foo': read error: Is a directory
>   ...
> 
> The program enters an infinite loop

Thanks for the report.  This is indeed a bug.

I wonder if the better fix would be to modify the gnulib argv-iter
module to make argv_iter_init_stream to fail if fileno(fp) is a
directory, since not all platforms reliably fail with EISDIR when doing
read() on a directory (some, like BSD, successfully return EOF, and some
older systems even read raw directory contents).

-- 
Eric Blake   eblake <at> redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

[signature.asc (application/pgp-signature, attachment)]

This bug report was last modified 14 years and 64 days ago.

Previous Next


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