Electric Fence(efence)は、malloc()のメモリバッファでオーバーラン(またはアンダーラン)を正確に起こす命令であなたのプログラムを停止します。。続いてGDBはバグを起こすソースコード行を表示します。仮想メモリのハードウェアを使用して各バッファの境界にレッドゾーンを作成し、それにタッチし、あなたのプログラムが停止します。長年にわたってあなたを悩ませている、これらの以前は捕捉不可能だった全てのオーバーランのバグをキャッチします。
Electric Fence will now debug multi-threaded programs correctly.
Besides the static version, it's loadable as a shared library
using LD_PRELOAD, thus you don't have to re-link your program to
debug it with Electric Fence. The command "ef <command>
will run any dynamic-linked executable under Electric
Fence and a bug concerning EF_PROTECT_FREE has been repaired.