apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davi Arnaut <d...@haxent.com.br>
Subject Re: [Vote] Release APR 1.2.9/0.9.14 and apr-iconv 1.2.0
Date Wed, 06 Jun 2007 16:39:52 GMT
Lucian Adrian Grijincu wrote:
> the cause: segmentation fault at:
>      rv = apr_socket_bind(sock, to);
> from static void sendto_receivefrom(abts_case *tc, void *data)
> from testsockets.c
> the second parameter given is NULL:
>      apr_socket_bind (sock=0x80d3c78, sa=0x0) at network_io/unix/sockets.c:154
> 
> the NULL value comes from
>      rv = apr_sockaddr_info_get(&to, addr, APR_UNSPEC, 7772, 0, p);
> Which was supposed to initialize it, but failed to.
> 
> digging deeper we get into network_io/unix/soccaddr.c, where there's a
> this call
>      error = getaddrinfo(hostname, servname, &hints, &ai_list);
> This returns -9 which gai_strerror says it means "Address family for
> hostname not supported".
> getaddrinfo's input params are:
>    hostname ="::1"
>    servname = 0x0
>    hints         = {ai_flags = AI_ADDRCONFIG, ai_family = 0,
> ai_socktype = 1, ai_protocol = 0, ai_addrlen = 0, ai_addr = 0x0,
> ai_canonname = 0x0, ai_next = 0x0}
> 

Hum, it seems the call_resolver (or the test) code is wrong because for
APR_UNSPEC it adds AI_ADDRCONFIG to the flags, which excludes loopback
addresses.

According to the getaddrinfo documentation, the loopback address is not
considered a valid configured address.

--
Davi Arnaut


Mime
View raw message