[Gllug] My and my malloc() problems....

Vincent AE Scott gllug at codex.net
Fri Dec 28 05:53:57 UTC 2001


Darran D. Rimron-Molloy(darran at rimron.co.uk)@Thu, Dec 27, 2001 at 10:48:32AM -0000:
> 
> > However, you're not providing any base case which fails (always debug an
> > error to the smallest area of code possible), nor even saying how it
> > fails. Compiling -g and running in gdb ought to give you a good idea of
> > why the code is failing if you exhaust every other possibility.
> 
> Compiling with -g actually fixes the problem (Confused, I am!) - I am going
> to carry on developing until it comes back, and then debug it.... hard to
> debug without -g it seems....
> 

hehe :-) jumping in half way thru a thread without playing catchup
first:

compiling -g often increase the size of the program in memory, code
which is not necessarily used while executing your program ( debug stuff
).  if memory corruption is occuring it can happen in the debug part of
the program, the part of the program that doesnt effect the actual
running of the code.  so it all appears to work fine, but in reality
it's just going to mess up later on instead.  If you have access to a
program called purify ( not checked if it's already been mentioned, so
places excuse me if it has ) it'll spot a whole load of internal runtime
errors.

-v

p.s. happy new years all, when it finally turns up.

-- 

PGP key:  http://codex.net/pgp/pgp.asc

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list