[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#58930: linking against librt causes segfault in gethostbyname on m68k



Package: libc6
Version: 2.1.3-2

Linking simple test program that calls gethostbyname() against librt
on m68k causes a segmentation fault.  The system is up-to-date against
potato (frozen) as of the Feb. 23, 2000 packages list.  

I noticed this problem because ntpdate on m68k exhibits it.  I
narrowed it to the following example.

Transcript:

inigo:~$ uname -a
Linux inigo 2.2.10 #54 Sun Aug 1 00:02:49 EDT 1999 m68k unknown
inigo:~$ cat gethosttest.c
#include <stdio.h>
#include <stdlib.h>
#include <netdb.h>

int main (int argc, char **argv)
{
  struct hostent *hp;
  char *name = argv[1];

  hp = gethostbyname(name);

  printf("Gotit: %x\n", hp);
  fflush(stdout);

  printf("%s: %X\n", hp->h_name, hp->h_addr_list[0]);

}
inigo:~$ cc gethosttest.c
inigo:~$ ./a.out www.debian.org
Gotit: c00cb5ec
www.debian.org: 800027D4
inigo:~$ ldd a.out
        libc.so.6 => /lib/libc.so.6 (0xc0015000)
        /lib/ld.so.1 => /lib/ld.so.1 (0xc0000000)
inigo:~$ cc -lrt gethosttest.c
inigo:~$ ./a.out www.debian.org
Segmentation fault
inigo:~$ ldd a.out
        librt.so.1 => /lib/librt.so.1 (0xc0015000)
        libc.so.6 => /lib/libc.so.6 (0xc001a000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xc00d2000)
        /lib/ld.so.1 => /lib/ld.so.1 (0xc0000000)
inigo:~$ 


-- 
Doug Larrick  doug@ties.org  doug.larrick@compaq.com  AIM: DougLarick


Reply to: