tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] RE :Re: VLA implementation


From: Edmund Grimley Evans
Subject: Re: [Tinycc-devel] RE :Re: VLA implementation
Date: Wed, 11 Nov 2015 07:40:49 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

> > In fact, this problem was detected by Valgrind without any signals
> Can you describe how to reproduce a test?

I think I've already given this recipe:


# Testing with Valgrind:

make clean
./configure
make
# On Intel, because of differences in floating-point arithmetic:
( cd tests && gcc -I.. tcctest.c && valgrind -q ./a.out > test.ref )
make test TCC="valgrind -q --leak-check=full `pwd`/tcc -B`pwd` -I`pwd`"


On i386, that recipe should detect the problem on 79_vla_continue.

You'll probably first have to insert a return at the start of
tcc_normalize_inc_dirs to prevent the errors caused by that buggy
function from confusing things.

On amd64 there's a 128-byte "red zone", which means you'd have to make
the VLAs bigger to see the problem. If you could modify
79_vla_continue.c to have the int VLA go up to 60 instead of 10 then
you should be able to see the problem on amd64.

Edmund



reply via email to

[Prev in Thread] Current Thread [Next in Thread]