Complexity of reallocating storage

Jean Marie Diaz ambar at ora.com
Tue Feb 5 06:58:05 AEST 1991


   From: brnstnd at 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



More information about the Comp.lang.c mailing list