[101] in linux-announce channel archive
Electric Fence: a different kind of malloc() debugger
daemon@ATHENA.MIT.EDU (Lars Wirzenius)
Fri Jan 20 11:54:56 1995
Date: Fri, 20 Jan 1995 15:54:48 +0200
From: Lars Wirzenius <wirzeniu@cc.helsinki.fi>
To: linux-activists@niksula.hut.fi, linux-announce@vger.rutgers.edu
X-Mn-Key: announce
From: bruce@pixar.com (Bruce Perens)
Subject: Electric Fence: a different kind of malloc() debugger
Newsgroups: comp.os.linux.announce
Organization: ?
Approved: linux-announce@tc.cornell.edu (Lars Wirzenius)
Followup-to: comp.os.linux.misc
Keywords: Malloc checker Electric Fence virtual memory overrun debugger
Electric fence uses the virtual memory hardware of your system to
detect read or write references beyond the end of a malloc() buffer. It
also can detect references to memory that has been released with
free(). Unlike Checker, Electric Fence will stop on the exact source
code line (and the exact instruction) that contains a bad memory
reference, even if that code doesn't call a library function. Electric
Fence doesn't rely on special versions of libraries, and will debug
pre-existing libraries and .o files. Electric Fence has thousands of
devoted users on all flavors of Unix workstations.
Electric Fence works by creating a special inaccessable memory page
at the end (or the beginning) of each malloc buffer. When software
attempts to read or write that inaccessable page, it gets an immediate
segmentation fault. Use GDB to tell you the exact line upon which the
fault happens. Freed pages can also be made inaccessable, so that a
reference to freed memory can be detected.
Kernel version 1.1.83 or higher is REQUIRED. The kernel VM implementation
had some bugs up until then.
There's one program that debugs malloc() overruns better than Electric Fence.
That's "Purify", from Pure Systems. Unfortunately, Purify isn't available for
Linux. Electric Fence is distributable under the GPL.
Bruce Perens
Begin3
Title: ElectricFence
Version: 2.0.5
Entered-date: 20JAN95
Description: A malloc debugger that uses the virtual memory hardware.
Keywords: Malloc checker Electric Fence virtual memory overrun debugger
Author: Bruce@Pixar.com (Bruce Perens)
Primary-site: ftp.pixar.com:pub/bruce
25k ElectricFence-2.0.5.tar.gz
1k ElectricFence.LSM
Alternate-site: sunsite.unc.edu:pub/Linux/Incoming -> pub/Linux/devel/c
Platforms: REQUIRES kernel 1.1.83 or above.
Copying-policy: GPL
End
--
<a href="http://www.rahul.net/perens>Bruce Perens AB6YM</a>
Voice phone: 510-215-3502 Internet: Bruce@Pixar.com
Amateur Radio: Bruce@ab6ym.ampr.org ab6ym@n0ary.#nocal.ca.usa.noam
--
Send submissions for comp.os.linux.announce to: linux-announce@news.ornl.gov
PLEASE remember Keywords: and a short description of the software.