Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Apr 2004 15:38:30 +1000
From:      Tim Robbins <tjr@freebsd.org>
To:        Brandon Erhart <berhart@ErhartGroup.COM>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: FreeBSD and Debugging?
Message-ID:  <20040410053830.GA59050@cat.robbins.dropbear.id.au>
In-Reply-To: <6.0.2.0.2.20040409230629.01cc1ec0@mx1.erhartgroup.com>
References:  <6.0.2.0.2.20040409230629.01cc1ec0@mx1.erhartgroup.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Apr 09, 2004 at 11:11:49PM -0600, Brandon Erhart wrote:

[...]
> Are there any debuggers out there for BSD that will detect the heap/stack 
> corruption!?

ElectricFence (devel/ElectricFence in the ports collection) detects
most kinds of heap corruption, but not stack corruption. It will reliably
abort the program on the exact instruction that first corrupts the heap
(e.g. overruns a buffer), then you can use gdb on the core dump to
analyze it further.

After installing the port, run your program with "ef.sh".


Tim



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040410053830.GA59050>