[Top][All Lists]

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

Re: [Tinycc-devel] [PATCH] arm: Handle __builtin_frame_address(1) correc

From: grischka
Subject: Re: [Tinycc-devel] [PATCH] arm: Handle __builtin_frame_address(1) correctly
Date: Sun, 09 Dec 2012 22:44:01 +0100
User-agent: Thunderbird (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. ;)

--- grischka

reply via email to

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