Pan crashing in libgnuregex after -pthread switchover

Andrey Chernov ache at nagual.pp.ru
Sat Mar 20 05:04:22 PST 2004


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/


More information about the freebsd-current mailing list