(Forwarded from Launchpad Bug #2148301)
Problem
The du utility generates a "Value too large for defined data type" error on 32-bit architectures when given a directory as an argument.
Reproduce
The error can be reproduced on a 64-bit system using the following steps:
- Install
qemu-system-i386:
# On a Debian derivative
sudo apt update && sudo apt install qemu-system-i386
- Clone and
cd uutils/coreutils:
git clone git@github.com:uutils/coreutils.git && cd coreutils
- Add i686 as a target using
rustup:
rustup target add i686-unknown-linux-gnu
- Build coreutils for i686 (runs on i386)
cargo build --release --target=i686-unknown-linux-gnu
- Run the built
du on the coreutils repository directory:
qemu-i386 ./target/i686-unknown-linux-gnu/release/coreutils du
The error output is:
du: cannot read directory '.': Value too large for defined data type
4 .
The bug seems strictly related to directories, as running du on a single large testfile generated using:
dd if=/dev/zero of=testfile bs=1M count=4096
does not give the error:
$ qemu-i386 ./target/i686-unknown-linux-gnu/release/coreutils du ./testfile
4194308 testfile
System
- OS release: Ubuntu 26.04 (Development branch)
- uutils coreutils version: 0.8.0 (built from 4e68e674)
(Forwarded from Launchpad Bug #2148301)
Problem
The
duutility generates a "Value too large for defined data type" error on 32-bit architectures when given a directory as an argument.Reproduce
The error can be reproduced on a 64-bit system using the following steps:
qemu-system-i386:cduutils/coreutils:rustup:duon the coreutils repository directory:The error output is:
The bug seems strictly related to directories, as running
duon a single large testfile generated using:does not give the error:
System