Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Mar 2004 16:04:17 +0300
From:      Andrey Chernov <ache@nagual.pp.ru>
To:        Peter Edwards <peter.edwards@openet-telecom.com>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Pan crashing in libgnuregex after -pthread switchover
Message-ID:  <20040320130416.GB53843@nagual.pp.ru>
In-Reply-To: <405B1304.1020307@openet-telecom.com>
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> <405B1304.1020307@openet-telecom.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Mar 19, 2004 at 03:34:28PM +0000, Peter Edwards wrote:
> 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.

It is interesting note, but I don't see how you really can use _both_ GNU
regex and libc regexec/regcomp. To use libc regexec/regcomp you need to
include our system's <regex.h>, but once you do it, you can't use GNU
regex due to headers conflicts. And vice versa, if you include
<gnu/regex.h> you can't use regexec/regcomp from libc, because can't
include their header, because it produce conflict. So you can either have
GNU version of all mentioned functions or system version, but not intermix
of them.

-- 
Andrey Chernov | http://ache.pp.ru/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040320130416.GB53843>