Bin Chen
2007-01-17 09:34:07 UTC
Hi,
I am debugging the buggy program which is fulfilled by malloc and free,
sometime it crashes in a curious place. I have found that some weird
problems are caused by freeing a wrong address. This makes the program
running, but will encounter strange behavior then.
Now I know MALLOC_CHECK_ can make the glibc print out the wrong free,
but the printed infomation is not enough. I want to attach gdb to the
process when the MALLOC_CHECK_'s check point is meet. This can give me
a backtrace when the wrong free occurs.
Any way to do this? Any help appreciated!
ABAI
I am debugging the buggy program which is fulfilled by malloc and free,
sometime it crashes in a curious place. I have found that some weird
problems are caused by freeing a wrong address. This makes the program
running, but will encounter strange behavior then.
Now I know MALLOC_CHECK_ can make the glibc print out the wrong free,
but the printed infomation is not enough. I want to attach gdb to the
process when the MALLOC_CHECK_'s check point is meet. This can give me
a backtrace when the wrong free occurs.
Any way to do this? Any help appreciated!
ABAI