avr-gcc-list
[Top][All Lists]
Advanced

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

Re: [avr-gcc-list] Stack use - possible bug


From: Paulo Marques
Subject: Re: [avr-gcc-list] Stack use - possible bug
Date: Wed, 09 Jun 2010 15:15:57 +0100
User-agent: Thunderbird 2.0.0.23 (X11/20090817)

Paulo Marques wrote:
> Dale wrote:
>> Hi Paulo                                         >@2010.06.09_15:29:48_+0200
> 
> Hi, Dale
> 
>>> Dale wrote:
>>> [...]
>>> Sometimes this doesn't work correctly, but I wasn't able to produce a
>>> simple case to show this problem (only very complex programs which I
>>> didn't want to post online). :(
>> Likewise, which is why I ended up with a crippled sample :-) The concept
>> is the same.
>>
>> But you agree that there's stack used and never returned for reuse?
> 
> Yes, but in the example shown there is no opportunity for reuse, so we
> can not know if the compiler would in fact reuse the space or not.
> 
> My point is that, in the example, if the compiler actually wrote code to
> decrease the stack it would made the code worse, because it would be
> doing operations on the stack pointer for nothing.
> 
> The problem is that people running gcc on "big" machines never notice
> this. The other crowd that noticed it already was the linux kernel
> people were the stack is limited to 4Kb. I'm trying to find a similar
> thread that I remember reading on LKML, but my google-fu is letting me
> down :(

Found it:

http://lkml.org/lkml/2008/8/26/197

It is almost 2 years old, so maybe things are better now.

I actually found this link on an old thread on the avr gcc mailing list
called "Stack usage under heavy inlining" that I started myself... I
desperately need to go on vacation :P

-- 
Paulo Marques
Software Development Department - Grupo PIE, S.A.
Phone: +351 252 290600, Fax: +351 252 290601
Web: www.grupopie.com

"Left to his own devices, he'd be /dev/null."



reply via email to

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