This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Stange gcc 3.3 bug on Linux/ia64


On Thu, Jul 03, 2003 at 07:01:42PM -0700, Jim Wilson wrote:
> H. J. Lu wrote:
> >It got stranger and stranger. I created a small Makefile to recreate
> >the problem. If I comment out 
> >PWD = $${PWDCMD-pwd}
> 
> This changes the environment size, which in turn changes the stack 
> addresses of all local variables.  This can affect several different 
> kinds of bugs.  If there is code that takes the address of a stack 
> variable, and then does something to it, like create a hash index, then 
> you get different hash indices with different environment sizes.  There 
> can also be problems if you have code reading an uninitialized local 
> variable, it may end up reading different garbage on the stack because 
> of different stack alignment/layout.  Or if you have a stray pointer or 
> out-of-bounds array access to a stack slot, you can get different 
> behaviour with environment size changes.
> 

It explains what I have seen. Thanks.


H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]