Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!brutus.cs.uiuc.edu!apple!bionet!ames!amelia!sun217!truesdel From: truesdel@sun217..nas.nasa.gov (David A. Truesdell) Newsgroups: comp.os.minix Subject: Re: POSIX Message-ID: <3600@amelia.nas.nasa.gov> Date: 27 Oct 89 05:03:15 GMT References: <3819@ast.cs.vu.nl> <1989Oct26.143100.4916@world.std.com> <3842@math.cs.vu.nl> Sender: news@amelia.nas.nasa.gov Lines: 18 ast@cs.vu.nl (Andy Tanenbaum) writes: >Perhaps it wasn't a bug previously, but has to be regarded as a bug now >because POSIX explicitly requires a call to closedir() with a rotten >argument to return EBADF, not to crash, trap or do anything else. (See >Sec. 5.1.2.4 of P1003.1). I bet to differ! I consider this to be pointing out a bug in the implementation of free(). Calling free(), with a grabage pointer, shouldn't result in a trap either. It shouldn't be layed at the feet of a portable library package to work around possible bugs in the underlying environment. A call to free() should (IMHO) result in either the storage being added to the free pool, if a valid looking header is found, or no action at all if garbage is presented. T.T.F.N., dave truesdell (truesdel@prandtl.nas.nasa.gov)