[uClibc] gethostbyname_r not properly creating hostent result when using dns ?

Erik Andersen andersen at codepoet.org
Mon Aug 2 15:08:07 UTC 2004

On Mon Aug 02, 2004 at 08:44:23AM -0400, Mike Frysinger wrote:
> 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

Great.  This is the sortof bug report that makes developers very
happy.  Sucks that there is a bug of course, but you've clearly
done your homework.  I'll take a look and see what I can find.


Erik B. Andersen             http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--

More information about the uClibc mailing list