Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Apr 1997 01:29:56 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        dfr@nlsystems.com, freebsd-bugs@hub.freebsd.org
Subject:   Re: kern/3384: Bug in telldir-closedir-opendir-seekdir
Message-ID:  <199704251529.BAA02198@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704251529.BAA02198>