Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!ncar!elroy.jpl.nasa.gov!sdd.hp.com!caen!ox.com!emv From: ambar@ora.com (Jean Marie Diaz) Newsgroups: comp.archives Subject: [comp.bugs.4bsd...] Re: Complexity of reallocating storage Message-ID: <1991Feb5.215412.14981@ox.com> Date: 5 Feb 91 21:54:12 GMT References: <21548@yunexus.YorkU.CA> <5883:Feb102:05:4991@kramden.acf.nyu.edu> <1991Feb4.195805.16710@ora.com> Sender: emv@ox.com (Edward Vielmetti) Reply-To: ambar@ora.com (Jean Marie Diaz) Followup-To: comp.bugs.4bsd,comp.lang.c Organization: Redheads Anonymous Lines: 36 Approved: emv@ox.com (Edward Vielmetti) X-Original-Newsgroups: comp.bugs.4bsd,comp.lang.c Archive-name: library/usenix/canthappen/1991-02-04 Archive: cs.toronto.edu:/doc/programming/canthappen.PS [128.100.1.65] Original-posting-by: ambar@ora.com (Jean Marie Diaz) Original-subject: Re: Complexity of reallocating storage Reposted-by: emv@ox.com (Edward Vielmetti) From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Date: 2 Feb 91 07:10:47 GMT > (void) read(fdsess,(char *) &newuid,sizeof(int)); This is guaranteed to work [...] > (void) chdir(".."); This is guaranteed to work. > (void) chdir(newsuid); > } Cannot fail. [and so forth] I commend to you a paper titled "Can't Happen, or /*NOTREACHED*/, or Real Programs Dump Core", by Ian Darwin & Geoff Collyer. It can be found in the proceedings of the Winter Usenix Conference, Dallas 1985, pages 136-151. Or FTP to cs.toronto.edu will get you the Postscript version under doc/programming/canthappen.PS. Since "anything that can go wrong will go wrong", it is a programmer's responsibility to deal with Murphy as gracefully as possible. Dumping core is never graceful. AMBAR