Subject: Re: CVS commit: basesrc
To: None <lukem@netbsd.org>
From: M Graff <explorer@flame.org>
List: source-changes
Date: 09/20/1999 17:12:12
Luke Mewburn <lukem@netbsd.org> writes:
> Module Name: basesrc
> Committed By: lukem
> Date: Fri Sep 17 00:21:14 UTC 1999
>
> Modified Files:
> basesrc/lib/libc/rpc: clnt_perror.c
>
> Log Message:
> since clnt_p*error() are expected to print an error message, print
> one if they're called with dodgy args. ;)
>
> To generate a diff of this commit:
> cvs rdiff -r1.18 -r1.19 basesrc/lib/libc/rpc/clnt_perror.c
>
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
This is the sort of thing I was worried we'd start doing.
If a function is called with bogus args, printing on the screen "bogus
args" is wrong. This would have normally caused a crash, and it
should still do so with the usual _DIAGASSERT(s != NULL) thing.
There should be no reason we allow execution to continue after a
PROGRAMMER bug is detected, but we should allow it to continue after
things like failed to open files.
The whole point to the suggestion I made about argument checking was
to catch programmer errors by supplying the file/line and a core dump,
not to ignore errors and continue. We're not linux here. :)
--Michael