freeaddrinfo(NULL)

Thomas Quinot thomas at FreeBSD.ORG
Tue Sep 21 11:07:50 PDT 2004


* Hajimu UMEMOTO, 2004-09-21 :

> Because, the behavior of freeaddrinfo (NULL) is undefined in RFC 2553
> nor RFC 3493.  Having such an assumption is a potentially bug and
> lose portability.

That a construct has no defined meaning does not imply that we must make
every effort to break applications that (erroneously) make use of it.
Would there be any significant drawback for conforming applications
if we made our best to deploy a safety net againt buggy user programs
by not segfaulting in this case?

There are many situations where the system already detects an invalid
pointer and reports it gracefully as an error rather than triggering a
fatal signal.

Thomas.

-- 
    Thomas.Quinot at Cuivre.FR.EU.ORG


More information about the freebsd-net mailing list