[TRE-general] buffer overflow on x86_64

skaller skaller at users.sourceforge.net
Mon Aug 28 22:42:37 EEST 2006


On Mon, 2006-08-28 at 21:44 +0300, Ville Laurikari wrote:
> > Hello!
> >
> > There seems to be a bug in either crm114 or tre which causes buffer
> > overflows when both are compiled for 64bit. Details of the problem
> > here: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=202893
> 
> Hi!
> 
> There's a chance that this bug is already fixed in the upstream darcs
> repo which is to become 0.7.5 some day.
> 
> The patch I'm talking about is here:
>   http://laurikari.net/darcs/darcs.cgi/tre-stable/?c=diff&p=20060728142445-ced27-cb09b970ebbcf69e595206351e4d26d3c6d477f5.gz
> 
> Does this by any chance solve the problem?  If not, there are further
> 64 bitness bugs in there somewhere.  I can take a look if I can get
> some example code which invokes the bug.

Do you have any example I can try? Tre only I mean?

My version of TRE is only 7.3 I think, but it is modified
for C++ and uses casts from void* to FLX_ADDRESS when
an integer is needed, then demoting to 'int' or whatever
Tre needs. Endian-ness is therefore irrelevant.
[FLX_ADDRESS is an unsigned int the size of void*]

If you do have an endian-ness problem .. it is probably
also a violation of strict ISO C aliasing rules, and the latest
gcc use those rules for optimisation now.


-- 
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