Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: basesrc



Luke Mewburn <lukem%netbsd.org@localhost> 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



Home | Main Index | Thread Index | Old Index