Darren J Moffat writes:
> The behavior of HP-UX and AIX is unknown to the author of this case,
> and since they are closed source there is no easy we to determine what
> their implementation does.

AIX prints an empty string, as though "" had been passed in.  Our
HP-UX box has locked up, or I'd give you that one as well.  :-/

> This isn't a scalable way to approach the problem and hurts the
> reputation of Solaris and OpenSolaris releases.  It also hinders the

The sad thing here is that it's really the bug-ridden application code
that mishandles NULL pointers that's of poor quality, so it's not
OpenSolaris's reputation that should be at stake.

So, with this one under our belts, should we also fix up the str*(3C)
family of functions so that they quietly ignore NULL pointers as well?
An application that's incautious with NULL can't possibly just make
that mistake with printf alone, can it?

Is NULL the only bad pointer worth caring about?  What sorts of bad
pointer checks need to be made so that malfunctioning applications can
continue running without dropping core?  How deep does the rabbit hole
go?

-- 
James Carlson, Solaris Networking              <james.d.carlson at sun.com>
Sun Microsystems / 35 Network Drive        71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677

Reply via email to