Em 16-05-2014 18:15, Stuart Henderson escreveu:
> Oh, static stripped binary of course... worth a try with this,
> if you have 5.5-stable sources on the system:
>
> cd /usr/src/sbin/ifconfig
> make obj
> make clean
> make DEBUG="-g -O0"
> gdb obj/ifconfig
> [...]
Stuart,

    Today I was able to debug it and here is the result. I hope it
helps. I'm posting it right now, and looking into the lines that trigger
the segfault, hopefully you'll be able to look into it too. As I
mentioned before, this isn't impeding me from using the virtualized
machines at all, it was just something I stumbled upon by accident when
I forgot to put the NONE in the hostname.if file. But, if this leads to
fixing a bug, it would be nice. Follow:

(gdb) set args em4 -inet
(gdb) run
Starting program: /usr/obj/sbin/ifconfig/ifconfig em4 -inet

Program received signal SIGSEGV, Segmentation fault.
strlcpy (dst=0x84e658 "", src=0x0, siz=Variable "siz" is not available.
) at /usr/src/lib/libc/string/strlcpy.c:37
37                              if ((*d++ = *s++) == '\0')
(gdb) bt
#0  strlcpy (dst=0x84e658 "", src=0x0, siz=Variable "siz" is not available.
) at /usr/src/lib/libc/string/strlcpy.c:37
#1  0x00000000004139a5 in _fillhostent (h=0x20ab94000, r=0x84e620,
buf=Variable "buf" is not available.
) at /usr/src/lib/libc/asr/gethostnamadr.c:72
#2  0x0000000000413c35 in gethostbyname2 (name=Variable "name" is not
available.
) at /usr/src/lib/libc/asr/gethostnamadr.c:124
#3  0x000000000040ad63 in in_getaddr (s=0x7f7ffffea9ac "-inet", which=1)
at /usr/src/sbin/ifconfig/ifconfig.c:4524
#4  0x0000000000401968 in setifaddr (addr=0x7f7ffffea9ac "-inet",
param=0) at /usr/src/sbin/ifconfig/ifconfig.c:1112
#5  0x0000000000400afd in main (argc=1, argv=0x7f7ffffea890) at
/usr/src/sbin/ifconfig/ifconfig.c:738

Cheers,

-- 
Giancarlo Razzolini
GPG: 4096R/77B981BC

Reply via email to