dash and /bin/sh test -nt (newer than) fails on large files

Bug #461238 reported by Ian! D. Allen
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dash (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: dash

Ubuntu 9.10rc and Ubuntu 8.10 and probably others.
x86 hardware

dash: Installed: 0.5.4-9ubuntu1.1 on 8.10 and Installed: 0.5.5.1-2ubuntu3 on 9.10rc

dash (and thus, via symlink, /bin/sh and thus almost every script on
the system) fails to handle test -nt on large files (larger than 2GB?).
All tests return false. BASH and /usr/bin/test handle it correctly.

$ dash
$ touch bar
$ dd if=/dev/zero of=foo bs=1024K count=2500
$ test foo -nt bar && echo hi
$ test bar -nt foo && echo hi
$ /usr/bin/test foo -nt bar && echo hi
hi

$ bash
bash$ test foo -nt bar && echo hi
hi

ProblemType: Bug
Architecture: i386
Dependencies:
 libgcc1 1:4.3.2-1ubuntu12
 gcc-4.3-base 4.3.2-1ubuntu12
 findutils 4.4.0-2ubuntu3
 debianutils 2.29ubuntu2
 libc6 2.8~20080505-0ubuntu9
DistroRelease: Ubuntu 8.10
Package: dash 0.5.4-9ubuntu1.1
ProcEnviron:
 LC_CTYPE=en_CA.utf8
 LC_COLLATE=C
 PATH=/home/username/bin86:/home/username/bin:/usr/bin:/usr/sbin:/sbin:/bin:/usr/games:/opt/real/RealPlayer:/usr/lib/xscreensaver
 LANG=C
 SHELL=/bin/bash
SourcePackage: dash
Uname: Linux 2.6.27-15-generic i686

Tags: apport-bug
Revision history for this message
aristovski (aleksandar-ristovski) wrote :

Please configure 32bit builds like so:

CFLAGS="-D_FILE_OFFSET_BITS=64 " ../configure

The issue will be with large file provided as input, e.g.

dash large_foo.sh

if large_foo exceeds 2Gib limit.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.