Date: Fri, 19 Mar 2004 15:34:28 +0000 From: Peter Edwards <peter.edwards@openet-telecom.com> To: Jason Andresen <jandrese@mitre.org> Cc: freebsd-current@freebsd.org Subject: Re: Pan crashing in libgnuregex after -pthread switchover Message-ID: <405B1304.1020307@openet-telecom.com> In-Reply-To: <405B055D.30203@mitre.org> References: <4058AC1C.10208@mitre.org> <xzpwu5i7s9v.fsf@dwp.des.no> <4059B9CD.1010003@openet-telecom.com> <4059C3B0.4080003@mitre.org> <20040318095842.W62520@carver.gumbysoft.com> <4059E668.1030405@openet-telecom.com> <405B055D.30203@mitre.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Jason Andresen wrote: > Peter Edwards wrote: > >> Doug White wrote: >> >>> For the record, the OpenLDAP server has the same problem. >>> >>> >>> >> On reflection, I think the most likely candidate is picking up the >> FreeBSD regex headers, but linking to the GNU regex library. There >> seems to be some activity afoot there recently, but I wasn't been >> following it. Maybe just adding -I /usr/include/gnu to the CFLAGS >> would help. (I've an old mail from Andrey Chernov in my -current >> mailbox that mentioned he wanted to do some work on this. Any >> comments, Andrey?) >> > > That seems to fix the problem. I'm surprised that picking up the > wrong include file would cause crashes at runtime, but forcing Pan to > use the gnuregex header file fixed the problem. > The layout of the structures passed to regexec() and regcomp() are note binary compatible between the GNU library and the FreeBSD libc. So, when you pick one at compile time, and get something else at run-time, Things Go Horribly Wrong. The older version of the GNU library didn't have the POSIX "regexec" or "regcomp" functions compiled-in, so this didn't pose a problem, but the "-DNO_POSIX_COMPAT=1" was dropped from src/gnu/lib/libregex/Makefile with the latest import. I'm not sure if this was intentional or not, but there's nothing obvious about it in the commit message.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?405B1304.1020307>