Subject: Re: lib/25869: resolver changes make bitkeeper crash
To: None <tech-userlevel@netbsd.org>
From: Christos Zoulas <christos@zoulas.com>
List: tech-userlevel
Date: 06/08/2004 22:40:18
In article <1086714543.916013.5466.nullmailer@yamt.dyndns.org>,
YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp> wrote:
>-=-=-=-=-=-
>
>hi,
>
>here's a simple test case of the binary compatibility problem.
>
>1. compile the attached file on a pre-bind9resolver box.
> % cc a.c
> % objdump -x a.out|grep _res
> 08049bc0 g O .bss 000001bc _res
> % ./a.out
> %
>
>2. run it on a post-bind9resolver box.
> kaeru% objdump -x /lib/libc.so.12.120|grep _res\$
> 000b5240 g O .bss 00000200 _res
> kaeru% ./a.out
> zsh: segmentation fault (core dumped) ./a.out
>
>YAMAMOTO Takashi
>
>
>-=-=-=-=-=-
>
>#include <sys/types.h>
>#include <netinet/in.h>
>#include <arpa/nameser.h>
>#include <resolv.h>
>
>int
>main()
>{
> _res.options |= RES_AAONLY;
> res_init();
>}
Tried this and it works for me:
[6:39pm] 73>objdump -x res | grep -w _res
08049a00 g O .bss 000001bc _res
[6:39pm] 74>objdump -x /lib/libc.so.12.120 | grep -w _res
000b5240 g O .bss 00000200 _res
[6:39pm] 75>./res