[Top][All Lists]

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

Re: memory corruption bug?

From: Norbert Nemec
Subject: Re: memory corruption bug?
Date: Wed, 7 Mar 2001 14:24:22 +0100
User-agent: Mutt/1.3.12i

Have you tried to fiddly around with compiler options? The sacomp optimization 
engine is somewhat buggy, so whenever you want to debug your code, you should 
switch optimization off first and see whether the problem might dissolve by 

Also, once you've located the problem in the Sather source code, you might want 
to take a look at the produced ANSI-C code. It is not very readable, but 
commands are translated rather straightforward, so you should be able to 
identify the lines created by that offending command.

Another hint: gcc2.95.2 has a bug in the optimization code as well. Do not use 
-O2 on sather code. That bug seems fixed for 2.95.3 but I do not know about 


On Tue, Mar 06, 2001 at 05:44:19PM +0000, Jean-Pierre Dussault wrote:
> Hi!
> A few weeks ago, I sent the following message/question. Our News server
> got down nearly at the same time, and I did'nt even read my own message
> from our usual news server. I happened to read an answer (using another
> news server) suggesting that the bug may originate in gcc version 2.96
> 20000731, which is a snapshot not officially distributed. I tested my
> program using gcc2.95.2, and the same bug occurs.
> Once again, any help will be appreciated,
> thanks,
> > Hi!
> > 
> > I observe a very strange behavior since I added bump mapping
> > computations in my graphics library. After intensive experimentation and
> > observation, I am able to produce what appears a memory corruption bug.
> > However, since the "bug" showed up when adding new features to an
> > already large project, I really don't see how I could reproduce its
> > behavior with a small scaled example!
> > 
> > To implement bump mapping, I added a field, mapDir (a pair of axises
> > giving the mapping directions). Now, I comment out EVERY use of mapDir
> > (confirmed using grep on my whole code), so that all I do is to SET and
> > COPY this field. Now, with the copy, my image is erroneous and  when I
> > comment out the copy operation, everything is fine. I attach a pair of
> > images representing hanging tubes showing differences; no bump map
> > computation is involved in those images.
> > 
> > Actually, I hit this problem for the first time using a copy operation
> > of some other field, and thought the problem originated in my code
> > somewhere. Now that I've isolated the problem to the copy operation of
> > an UNUSED variable, I am afraid that the problem does'nt lie in my code.
> > 
> > I use sather-1.2.1, gcc version 2.96 20000731 (Red Hat Linux 7.0),
> > gc4.14.
> > 
> > Any help will be appreciated!!!
> > 
> > Thanks,
> > 
> > JPD

-- ______________________________________________________
--          To Him, even that machine here has to obey...
-- _________________________________Norbert "Nobbi" Nemec
-- Hindenburgstr. 44  ...  D-91054 Erlangen  ...  Germany
-- eMail: <address@hidden>   Tel: +49-(0)-9131-204180

reply via email to

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