This is the mail archive of the gcc-help@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: C code working using CC but not with gcc


gkarthi29 wrote:

> This is a sample c code that i ve posted here. Actually we have 100k LOC of
> such code in our application.
> and we have so many such uninitialized variable in that code.
> 
> But this is code was working fine in AIX server and we ported and compiled
> the same in HP we meet with Memory Fault error.
> 
> Since this code was working fine in AIX we are not supposed to make any code
> change in that.

I believe this rule is unrealistic.  The code might well work perfectly in AIX,
yet still be full of bugs that are only revealed when you try to run on another
platform.

> Do you have any solution for this?

You need to run Valgrind's memory checker on your code.
http://valgrind.org/

Andrew.


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