From owner-freebsd-current@FreeBSD.ORG Fri Mar 19 07:34:31 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 88FFE16A4CE for ; Fri, 19 Mar 2004 07:34:31 -0800 (PST) Received: from sweeper.openet-telecom.com (mail.openet-telecom.com [62.17.151.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4CB1443D1D for ; Fri, 19 Mar 2004 07:34:30 -0800 (PST) (envelope-from peter.edwards@openet-telecom.com) Received: from mail.openet-telecom.com (unverified) by sweeper.openet-telecom.com ; Fri, 19 Mar 2004 15:34:54 +0000 Received: from openet-telecom.com (10.0.3.126) by mail.openet-telecom.com (NPlex 6.5.027) (authenticated as Peter@openet-telecom.com) id 404A4ED700012101; Fri, 19 Mar 2004 15:34:35 +0000 Message-ID: <405B1304.1020307@openet-telecom.com> Date: Fri, 19 Mar 2004 15:34:28 +0000 From: Peter Edwards User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-GB; rv:1.6) Gecko/20040120 X-Accept-Language: en-gb, en MIME-Version: 1.0 To: Jason Andresen References: <4058AC1C.10208@mitre.org> <4059B9CD.1010003@openet-telecom.com> <4059C3B0.4080003@mitre.org> <20040318095842.W62520@carver.gumbysoft.com> <4059E668.1030405@openet-telecom.com> <405B055D.30203@mitre.org> In-Reply-To: <405B055D.30203@mitre.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: Andrey Chernov cc: freebsd-current@freebsd.org Subject: Re: Pan crashing in libgnuregex after -pthread switchover X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Mar 2004 15:34:31 -0000 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.