Know How
https://elinux.org/Electric_Fence
Download Web site
https://launchpad.net/ubuntu/zesty/amd64/electric-fence/2.2.5
Summary
Electric Fence is a debugger that uses virtual memory hardware to detect
illegal memory accesses. It can detect two common programming bugs: software
that overruns or underruns the boundaries of a malloc() memory allocation,
and software that touches a memory allocation that has been released by
free().
Unlike other malloc() debuggers, Electric Fence will detect read accesses as
well as writes, and it will stop and pinpoint the exact instruction that
causes an error. It is not as thorough as Purify, however.
In order to debug a program it needs to be linked with Electric Fence's
library or dynamic linking needs to be used; README.Debian explains that in
detail.
Install
(just use the pre-build package should be ok)
$ sudo dpkg -i electric-fence_2.2.5_amd64.deb
then, libefence.a & libefence.so.0.0 will lay in /usr/lib
(over)