[uClibc] gethostbyname_r not properly creating hostent result when
using dns ?
Mike Frysinger
vapier at gentoo.org
Mon Aug 2 06:44:23 MDT 2004
while playing with an uclibc chroot, i noticed that a basic portage operation
was resulting in a segfault ... i narrowed it down to a simple python
statement:
python -c 'import socket; print socket.gethostbyname_ex("wh0rd.org")[2];'
the gethostbyname_r() call itself is not segfaulting, but the memory returned
in the h_aliases array seems to be wrong ...
i wrote a simple .c program to replicate the error (find attached) ... the
program runs just fine in a glibc environment, and if i stick 'wh0rd.org'
into my /etc/hosts file, everything works in uclibc too ...
i also verified that dns works just fine in the uclibc env with the domain by
running `dig wh0rd.org` and getting the correct results
any insight would be great :)
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uclibc-segfault.c
Type: text/x-csrc
Size: 996 bytes
Desc: not available
Url : http://uclibc.org/lists/uclibc/attachments/20040802/e7e3ac2a/uclibc-segfault.c
More information about the uClibc
mailing list