NetBSD Problem Report #18455
Received: (qmail 22299 invoked by uid 605); 28 Sep 2002 20:53:44 -0000
Message-Id: <200209282053.g8SKrdB02110@endor.kosmos.all>
Date: Sat, 28 Sep 2002 22:53:39 +0200 (CEST)
From: Benedikt Meurer <bmeurer@fwdn.de>
Sender: gnats-bugs-owner@netbsd.org
Reply-To: bmeurer@fwdn.de
To: gnats-bugs@gnats.netbsd.org
Subject: latest du(1) change cause du to dump core
X-Send-Pr-Version: 3.95
>Number: 18455
>Category: bin
>Synopsis: latest du(1) change cause du to dump core
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Sep 28 20:54:01 +0000 2002
>Closed-Date: Sat Sep 28 21:31:10 +0000 2002
>Last-Modified: Sat Sep 28 21:31:10 +0000 2002
>Originator: Benedikt Meurer
>Release: NetBSD 1.6
>Organization:
University Siegen
>Environment:
System: NetBSD endor.kosmos.all 1.6 NetBSD 1.6 (ENDOR) #0: Fri Sep 27 16:35:03 CEST 2002 benny@darkstar.kosmos.all:/usr/src/sys/arch/i386/compile/ENDOR i386
Architecture: i386
Machine: i386
>Description:
latest change to du(1) causes it to dump core on a divide-by-null, cause
blocksize is now defined twice, once global (as needed) and once in
main, so any changes to blocksize won't affect the global blocksize var,
which stays 0. Also totalblocks should be of type int64_t to allow du(1)
to manage large files.
>How-To-Repeat:
get latest du(1) from current, compile and run _without_ -h flag.
>Fix:
Apply the following patch:
Index: du.c
===================================================================
RCS file: /cvsroot/basesrc/usr.bin/du/du.c,v
retrieving revision 1.18
diff -r1.18 du.c
81c81
< long blocksize, totalblocks;
---
> int64_t totalblocks;
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: provos
State-Changed-When: Sat Sep 28 14:30:47 PDT 2002
State-Changed-Why:
fixed. thank you for your bug report.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.