Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

Re: [milter-greylist] Re: milter-greylist 3.0rc6 segmentation fault.

2006-10-28 by AIDA Shinra

At Fri, 27 Oct 2006 20:27:27 -0400,
Matt Kettler wrote:
> 
> Matt Kettler wrote:
> > I just tried to run milter-greylist 3.0rc6 on my machine and it segfaults while
> > loading the configuration.
> > 
> > I trapped it in gdb, and did a backtrace of the stack:
> > 
> > #0  0x4015b54c in memcpy () from /lib/i686/libc.so.6
> > #1  0x40019c73 in memcpy () from /lib/libsafe.so.2
> > #2  0x0804db4d in ipfromstring (str=0x8090deb "127.0.0.0", sa=0x8087c80,
> >     salen=0xbffc8678, family=16) at pending.c:600
> > #3  0x08052a2d in conf_lex () at conf_lex.l:179
> > #4  0x0805253e in conf_parse () at bison.simple:573
> > #5  0x08054895 in conf_load () at conf.c:152
> > #6  0x0804b5e4 in main (argc=1, argv=0xbffff9d4) at milter-greylist.c:886
> > #7  0x400f4a67 in __libc_start_main () from /lib/i686/libc.so.6
> > 
> > 
> > It looks like it blew up trying to parse a like containing 127.0.0.0.

It is not a thread problem. I can't tell the exact reason, but it looks
a binary incompatibility between libc and libbind. Especially, struct
addrinfo is suspicious.
* Make sure to include BIND's headers rather than system headers.
* If it does not work or breaks another thing, undefine
HAVE_GETADDRINFO in your config.h.

> Ok, upon further testing, it stops blowing up if I build with ./configure.
> 
> Only when I use: "--enable-dnsrbl  --with-libbind=/usr/lib/" does it blow up.
> That suggests that my build of libbind isn't thread safe.

I think --with-libbind=/usr/local is appropreate here.

> I tried adding --enable-threads to the configure for bind, rebuilt/reinistalled
> libbind (strangely only libbind.a changed, the .so had the same md5sum as the
> old one. Yes I did make clean first.. so it did rebuild it.). No help.

It is intentional design. BIND guys do not hope existing programs
link spontaneously new libbind spontaneously.

> This is the configure I'm using in bind 9.2.1:
> 
> /configure --with-libtool --enable-libbind --enable-threads
> --with-randomdev=/dev/random
> 
> (and yes, I'm correctly moving libbind.* from /usr/local/lib to /usr/lib where
> ld will find them)

It looks dangerous. It may lead ABI crashes between /usr/include/*.h
and /usr/lib/libbind.a.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.