socket.getaddrinfo(None, 0, socket.AF_UNSPEC, socket.SOCK_STREAM, 0,
socket.AI_PASSIVE)
+ # Issue 17269
+ socket.getaddrinfo("localhost", None, 0, 0, 0, socket.AI_NUMERICSERV)
def check_sendall_interrupted(self, with_timeout):
# socketpair() is not stricly required, but it makes things easier.
- Fix typos in the multiprocessing module.
+- Issue #17269: Workaround for socket.getaddrinfo crash on MacOS X
+ with port None or "0" and flags AI_NUMERICSERV.
+
IDLE
----
Core and Builtins
-----------------
-- Issue #15535: Fixed regression in the pickling of named tuples by
+- Issue #15535: Fixed regression in the pickling of named tuples by
removing the __dict__ property introduced in 2.7.4.
- Issue #17857: Prevent build failures with pre-3.5.0 versions of sqlite3,
"getaddrinfo() argument 2 must be integer or string");
goto err;
}
+#ifdef __APPLE__
+ if ((flags & AI_NUMERICSERV) && (pptr == NULL || (pptr[0] == '0' && pptr[1] == 0))) {
+ /* On OSX upto at least OSX 10.8 getaddrinfo crashes
+ * if AI_NUMERICSERV is set and the servname is NULL or "0".
+ * This workaround avoids a segfault in libsystem.
+ */
+ pptr = "00";
+ }
+#endif
memset(&hints, 0, sizeof(hints));
hints.ai_family = family;
hints.ai_socktype = socktype;