[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] [PATCH] arm: Handle __builtin_frame_address(1) correc
Re: [Tinycc-devel] [PATCH] arm: Handle __builtin_frame_address(1) correctly
Sun, 09 Dec 2012 22:44:01 +0100
Thunderbird 18.104.22.168 (Windows/20090812)
Kirill Smelkov wrote:
Also grischka writes:
btest is not a feature that we can't recommend to use
really (at least as long as tcc -btest tcc.c doesn't produce anything
FYI, as of mob a55ecf6d it now does, so please don't treat -b mode as
second class citizen anymore.
Ok. I admit that I never tried to understand how it really works.
I have questions though regarding your change to the tcc code with
vtop = vstack - 1;
Basically this is not wrong as the code never tries to access this
address. The point of this "trick" obviously is that we can
pre-increment vtop and still not waste the first entry.
Anyway, to get rid of this somehow non-obvious code you could have
changed it to
vtop = vstack;
But that is not what you do, instead you introduce some macro magic
which looks interesting but does nothing different, i.e. it also
wastes the first entry in vstack. So what is the point with that?
However the more interesting question is, why at all is that a problem
with the bounds-checker? Should it not warn only when a pointer is
dereferenced to an invalid address? Because, if we need to "fix"
correct code in tcc to work with -b, then what about equally correct
code elsewhere that also would not cooperate well with -b but that
we (you) cannot fix?
Thanks for shedding some lights into this dark corner of tcc code. ;)
Re: [Tinycc-devel] [PATCH] arm: Handle __builtin_frame_address(1) correctly, grischka, 2012/12/06