Bug#175529: re_compile_pattern bug
The problem seems to be that the re_compile_pattern() in glibc returns
an error code and munges the re_pattern_buffer so that it's unsuitable
to be passed to re_compile_pattern() without being reinitialised. (In
particular, the buffer structure ends up with buffer pointing to NULL,
and allocated and used set to 88 bytes (on my system)) The version
included in coreutils seems to not do that -- it returns a valid chunk
of memory that it reuses on the next invocation.
I couldn't find any docs on what the right behaviour is, it could be
"whatever glibc does", afaict.
On the upside, coreutils doesn't make any use of this particular
part of behaviour: it initialises its buffers before every call to
re_compile_pattern. So the configure test could be changed to do something
memset(®ex, 0, sizeof(regex));
before every call, and that should work fine. I've no idea if that's right
I haven't looked at mutt yet, to see if this is the cause of whatever bug it
Anthony Towns <email@example.com> <http://azure.humbug.org.au/~aj/>
I don't speak for anyone save myself. GPG signed mail preferred.
``Australian Linux Lovefest Heads West''
-- linux.conf.au, Perth W.A., 22nd-25th January 2003