开发者

How to use libumem to find heap corruption, without relying on a 'core' file?

开发者 https://www.devze.com 2023-03-08 09:03 出处:网络
I want to know how to use libumem on solaris. If I follow http://www.unix.com/man-page/OpenSolaris/3malloc/umem_debug/ and start the process with all the options, how will I get the output?

I want to know how to use libumem on solaris. If I follow http://www.unix.com/man-page/OpenSolaris/3malloc/umem_debug/ and start the process with all the options, how will I get the output?

Can 开发者_如何学运维I get a text file of the results?

I have used wdb on HP-UX for the same. This generates a text file after the program exits, that I can analyze later. Can I do that same for libumem?

Note: This is a remote debugging, I will not have access to the system until afterwards.


You can create a core file of the process before it exits and examine the code with mdb later. One way to generate that core file at the right moment could be a dtrace script that will trigger the gcore just when exit is called.


I think libumem will generate a core when things goes wrong , you can analyze this core using mdb , certain commands like ::umem_status , umem_verify will help you in finding the corruption

0

精彩评论

暂无评论...
验证码 换一张
取 消