[TRE-general] Weird bug

skaller skaller at users.sourceforge.net
Mon May 15 10:19:37 EEST 2006


On Mon, 2006-05-15 at 09:43 +0300, Ville Laurikari wrote:

> For example, if you add a call to tre_version() you can be pretty sure
> that the reg* functions are also coming from TRE.  Screwing that up
> would require somehow managing to link only some of the symbols from
> libtre and the rest from libc -- not likely to happen.

If it can be screwed up, I'll find a way :) 

But clearly this can happen because that is precisely
what does happen when TRE is being linked. Some symbols
are coming from TRE and some from the C library.

BTW: Felix will enforce linking the right library automatically.
But my example wasn't using the technology that does that yet,
I was just trying to check my C++ version of tre worked.

Funny thing is .. if this is supposed to be a replacement
for GNU regex .. well it obviously cannot support dynamically
switching the libraries around. The functions are compile time
compatible but not link time compatible: the compiled regexp
object of TRE is obviously smaller than the GNU one, and 
the GNU regcomp was clobbering memory.

-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net



More information about the TRE-general mailing list