On Wed, Nov 16, 2005 at 05:48:54AM -0600, Mike Emmel wrote:
> On further testing of  the patch and sent it to the list I got memory
> corruption problems similar to what you described how did you get glib
> to detect the double free ?

For what it is worth, sometimes I use

(gdb) set env LD_PRELOAD=libefence.so.0
(gdb) run

or

$ LD_PRELOAD=libefence.so.0 name_of_program

The Electric Fence library seems to be less resource intensive than
other options (compile-time instrumentation, such as dmalloc, and
execution-time instrumentation, such as Valgrind).  libefence is a wrapper
for malloc and friends that seems to assign each malloc() block to a new
4-kilobyte page that will be mprotect()ed on free().  Dereferencing a
freed pointer or going out of bounds is likely to trigger a SIGSEGV.

        Marko

_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to