Electric Fence(efence)は、malloc()のメモリバッファでオーバーラン(またはアンダーラン)を正確に起こす命令であなたのプログラムを停止します。。続いてGDBはバグを起こすソースコード行を表示します。仮想メモリのハードウェアを使用して各バッファの境界にレッドゾーンを作成し、それにタッチし、あなたのプログラムが停止します。長年にわたってあなたを悩ませている、これらの以前は捕捉不可能だった全てのオーバーランのバグをキャッチします。
Broken signal handling was fixed in the confidence
test program eftest. The second SIGSEGV signal
stopped getting caught from the signal handler.
setjmp/longjmp was changed to
sigsetjmp/siglongjmp, and calls to sigprocmask
were added to unblock further signals.
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.
I'm putting out the stable version before I start to patch in
thread-safeness and other modifications I've been sent. This would
be a good time to send me patches.