We tracked it down, the problem is (1) Apple's getaddrinfo(dotted-quad, hints.flags=AI_CANONNAME) returns ai_canonname=NULL, (2) my getaddrinfo caching code expects ai_canonname to be non-null always, because it always sets AI_CANONNAME. (2) is easier to fix....