Re: Segfault in libpspell


Subject: Re: Segfault in libpspell
From: Dom Lachowicz (cinamod@hotmail.com)
Date: Wed Nov 15 2000 - 11:22:44 CST


Sam TH said:
>Because programs shouldn't segfault. This is certainly our fault,
>for passing the NULL pointer. However, it is preferable to check
>that, than to just segfault.
Programs shouldn't segfault. But libraries *should* segfault/terminate
abnormally *only if* they have been placed into an invalid/unworkable state
by some program. A certain amount of defensive coding should be done in the
library to be gentle on non-outrageous errors, but the application calling
the library should never put the library into an unstable state. Segfaulting
on NULL pointers is a good example of this. Libraries who are coded
ultra-defensively (like glib) end up just masking large fundamental flaws in
the calling programs. This is bad.

Dom
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at
http://profiles.msn.com.



This archive was generated by hypermail 2b25 : Wed Nov 15 2000 - 11:22:48 CST