Chris Quenelle is a tools developer at Oracle Corp. He's worked on performance and debugging tools at Sun and Oracle for over 15 years. He reads comic books and science fiction, and has more tivos than he can keep track of.

 

March 2006
S M T W T F S
« Feb   May »
 1234
567891011
12131415161718
19202122232425
262728293031  

How to use libumem to find a bad free call

I have not seen any good simple tutorials on how to use libumem for debugging.  (Unless you also want to learn how to use mdb).  So I wrote a simple example.

% more t.c

#include
#include
int main()
{
    int i;
    free(&i);
    i = 10;
    char * p = (char *) malloc(1000);
}

This program has a bug, and it might crash or [...]