delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/11/06/22:07:10

Message-Id: <199811070306.TAA11240@geocities.com>
From: cssl AT geocities DOT com
Sender: cssl AT mail DOT geocities DOT com
To: bowman <bowman AT montana DOT com>, djgpp-workers AT delorie DOT com
Date: Sat, 7 Nov 1998 03:20:38 GMT0BST
MIME-Version: 1.0
Subject: Re: V 2.02 'free' problem
X-mailer: Pegasus Mail v3.31
Reply-To: djgpp-workers AT delorie DOT com

 > Still playing with it, but nothing is jumping out to grab me. It
 > certainly looks like a problem with the block structure being
 > corrupted. MC is known to have memory leaks, but if it is overrunning
 > the buffer, i am in deep trouble, since the failure occurs from many
 > different sequences of calls. I've exercised it through the same
 > steps, and after 4 or 5 thousand invocations of 'free' something goes
 > sour.
Have you already tried FORTIFY or similar libraries ? They can help a 
lot... Some bugs become EVIDENT when (for example) the allocated memory is 
initialized with a certain pattern... Buffer overruns are detected simply 
allocating a bigger buffer with "guards" around. If at free() a guard is 
not the same as it was at malloc, an overrun happened...
Well, all this (and something more) is handled by (Z)FORTIFY...

BYtE,
 Diego
 

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019