From owner-freebsd-bugs Fri Apr 25 08:31:36 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id IAA22623 for bugs-outgoing; Fri, 25 Apr 1997 08:31:36 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id IAA22618 for ; Fri, 25 Apr 1997 08:31:33 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.5/8.6.9) id BAA02198; Sat, 26 Apr 1997 01:29:56 +1000 Date: Sat, 26 Apr 1997 01:29:56 +1000 From: Bruce Evans Message-Id: <199704251529.BAA02198@godzilla.zeta.org.au> To: dfr@nlsystems.com, freebsd-bugs@hub.freebsd.org Subject: Re: kern/3384: Bug in telldir-closedir-opendir-seekdir Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > You can't use the results of telldir after the directory has been closed. > The manpage for seekdir clearly states this. It also says that "It is safe to use a telldir() value immediately after a call to opendir() and before any calls to readdir()". We also use the SINGLEUSE compile time option which gives undocumented semantics. If this were standard then there would by no need to clean up the cookies on close - there would be at most one leaked per close, and programs could be expected to do clean it by seeking before close. The test program dumps core with malloc options AJ due to using a garbage dp after close. Bruce