On Wed, Oct 15, 2014 at 11:31:12PM -0400, Daniel Dickman wrote:
> > ping hostname which has slash in the name causes seg fault
> >
> > # ping a/aa
> > Segmentation fault
> >
> > ping6 seems to be ok reporting no address associated with name
> > 5.4 ping is reporting unknown host - ok
> >
> 
> Thanks for reporting. Confirmed on -current i386. ping crashes when
> calling gethostbyname("a/aa"). backtrace below.
> 
> I'm cc'ing eric@ if he has any thoughts.
> 
> Program received signal SIGSEGV, Segmentation fault.
> strlcpy (dst=0x3c0081ac "", src=0x0, siz=4084) at
> /usr/src/lib/libc/string/strlcpy.c:37
> 37                              if ((*d++ = *s++) == '\0')
> (gdb) bt
> #0  strlcpy (dst=0x3c0081ac "", src=0x0, siz=4084) at
> /usr/src/lib/libc/string/strlcpy.c:37
> #1  0x1c005089 in _fillhostent (h=0x81274000, r=0x3c008180,
> buf=Variable "buf" is not available.
> ) at /usr/src/lib/libc/asr/gethostnamadr.c:73
> #2  0x1c005320 in gethostbyname2 (name=0xcfbd9404 "a/aa", af=2) at
> /usr/src/lib/libc/asr/gethostnamadr.c:125
> #3  0x1c005400 in gethostbyname (name=0xcfbd9404 "a/aa") at
> /usr/src/lib/libc/asr/gethostnamadr.c:142
> #4  0x1c002ea3 in main (argc=Variable "argc" is not available.
> ) at /usr/src/sbin/ping/ping.c:356

Weird... I can't reproduce it here on i386 on a snapshot from sep25.
And no asr diff was commited in between...
Can you give more info about your setup? /etc/resolv.conf, /etc/hosts

Eric.

Reply via email to