Mail Archives: djgpp-workers/1998/11/06/22:07:10
> 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 -