Subject: bin/11128: bind coredumps in 1.5_ALPHA
To: None <email@example.com>
From: Ian Dall <firstname.lastname@example.org>
Date: 10/04/2000 07:47:18
>Synopsis: The name daemon (bind) dumps core
>Arrival-Date: Wed Oct 04 07:47:00 PDT 2000
>Originator: Ian Dall
>Release: Sep 30, 2000
System: NetBSD gateway.beware.dropbear.id.au 1.5_ALPHA NetBSD 1.5_ALPHA (SIBYL) #0: Sun Aug 13 15:28:38 CST 2000 email@example.com:/usr3/netbsd-src/bsrc/sys/arch/pc532/compile/SIBYL pc532
Running named on the pc532 platform core dumps almost immediately.
The problem seems to be due to writing beyond the end of the _res variable.
This happens in res_init.c:184, but is due to a problem in irs_data.c.
Bind uses its own version of resolv.h. The bind resolv.h defines
a bind___res_state structure and a bind__res instance of that structure.
__res_state and _res are cpp defines for convenience.
In irs_data.c there following appears:
extern struct __res_state _res;
However, this undoes exactly the clash which was prevented by defining
_res to be bind__res. There may be other libc modules which have _res
So, there is an external variable defined with different sizes in different
modules. I am not sure exactly what the linker does with this, but it doesn't
allocate enough space.
Removing the "#undef _res" fixes the problem (which begs the question of
why it was there in the first place). The extern statement is redundant
because it appears in resolv.h.