[erlang-questions] Re: Erlang/OTP R14B01 has been released

Boris Mühmer boris.muehmer@REDACTED
Mon Dec 13 21:38:14 CET 2010


Am Montag, den 13.12.2010, 19:49 +0100 schrieb Boris Mühmer:
> Core was generated by `/opt/erlang-otp/lib/erlang/erts-5.8.2/bin/beam.smp -- -root /opt/erlang-otp/lib'.
> Program terminated with signal 11, Segmentation fault.
> #0  0x0000000000577ba2 in inet_ctl_getifaddrs (desc=<value optimized out>, cmd=<value optimized out>, 
>     buf=<value optimized out>, len=0, rbuf=<value optimized out>, rsize=<value optimized out>)
>     at drivers/common/inet_drv.c:4948
> 4948		if (ifa_p->ifa_addr->sa_family == AF_INET

I checked one more thing:

(gdb) l
4943		utf8_encode(ifa_p->ifa_name, -1, buf_p);
4944		buf_p += len;
4945		*buf_p++ = '\0';
4946		*buf_p++ = INET_IFOPT_FLAGS;
4947		put_int32(IFGET_FLAGS(ifa_p->ifa_flags), buf_p); buf_p += 4;
4948		if (ifa_p->ifa_addr->sa_family == AF_INET
4949	#if defined(AF_INET6)
4950		    || ifa_p->ifa_addr->sa_family == AF_INET6
4951	#endif
4952		    ) {
(gdb) p ifa_p
$1 = (struct ifaddrs *) 0x2853d20
(gdb) p ifa_p->ifa_addr
$2 = (struct sockaddr *) 0x0

Hmmm... well, then statement

if (ifa_p->ifa_addr->sa_family == AF_INET

will "of course" fail.

The "offending" device is:

(gdb) p ifa_p->ifa_name
$7 = 0x2853dc4 "tun0"

The "OpenVPN" device.


  - boris




More information about the erlang-questions mailing list