Re: Pan crashing in libgnuregex after -pthread switchover

From: Peter Edwards <peter.edwards_at_openet-telecom.com>
Date: Fri, 19 Mar 2004 15:34:28 +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.
Received on Fri Mar 19 2004 - 06:34:31 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:48 UTC