[LCP]Segmentation Faults when calling free()

Chuck Martin nrocinu at myrealbox.com
Fri Feb 21 05:54:01 UTC 2003


On Thu, Feb 20, 2003 at 05:03:24PM +1100, Matthew Palmer wrote:
> Solution?  Compile with electric fence, and run in a debugger.  Efence
> causes a segfault on the first instruction which writes outside the n bytes
> which you've been specifically allocated (and hence catches overruns,
> underruns, and fencepost errors).  Very, very useful for finding bugs like
> this.

Thanks.  Where do you get electric fence?  Is it free or commercial?

Chuck




More information about the linuxCprogramming mailing list