Re: C code working using CC but not with gcc

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

 



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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux