Subject: Re: segmentation fault on fclose?
To: None <current-users@sun-lamp.cs.berkeley.edu>
From: Ty Sarna <tsarna@endicor.com>
List: current-users
Date: 09/13/1994 14:05:48
In article <Cw0zH0.J2y@deshaw.com> christos@deshaw.com (Christos Zoulas) writes:
> NOT!
> 
> The unix library is written with out any argument checking in most places;
> it is intended to be fast and small, and not to protect a programmer from
> her/his own bugs.

The example you gave is a tad excessive, but it might be a good idea to
give the system libraries a liberal sprinking of assert()s controlled by
#ifdef DIAGNOSTIC (by analogy with the kernel, and for the same
reasons). Not only would that help programmers catch errors in their
code more quickly, but it might also catch errors in the libraries
themselves.

-- 
Ty Sarna                   "You can lead a gift horse to water but 
tsarna@endicor.com          you can't make him look you in the mouth"