Hi,

Thanks!!!

Question2. How do get the CTF Info into object files. Will compilation
with "-g" help??

I am not familiar with dbx I managed to load the source file and the
core in dbx. 
I guess I will need to go through the documentation to understand and
use this? Any quick references :-).

-----Original Message-----
From: max at bruningsystems.com [mailto:m...@bruningsystems.com] 
Sent: Tuesday, January 13, 2009 1:50 PM
To: Girish Prabhakarrao (WT01 - Telecom Equipment)
Cc: mdb-discuss at opensolaris.org
Subject: Re: [mdb-discuss] help find leaks using purify and mdb???

Hi Girish,

girish.prabhakarrao at wipro.com wrote:
>
> Hi,
>
> I am trying to fix leaks in my C++ app code.
>
> Purify reports the following
>
> " MLK: 12800 bytes leaked in 4 blocks
>
> This memory was allocated from:
>
> malloc [rtlib.o]
>
> c2n6Fi_Pv___1 [libCrun.so.1]
>
> void*operator new(unsigned) [rtlib.o]
>
> MyMethod * ctrRef;
>
> => ctrRef = new MyMethod( argstoThread );
>
> Block of 3200 bytes (4 times); last block at 0x2d7518
>
>
> I generated a core file by using a gcore and ran a dis command. My 
> intention is to find out what is the data structure which is not 
> getting deleted.
>
> However I am unable to figure out the structure. Any pointers??????
>
> What does illtrap mean?
>
> >* 0x2d7518::dis*
>
> 0x2d74f0: 0xa5ff53f1
>
> 0x2d74f4: illtrap 0xc80
>
The address you are looking at here (0x2d7518) is not code. I don't know
purify, but I suspect this is the address of a block of data that has 
not been freed.
Based on the output above from purify, I suspect MyMethod structures
are not getting freed. If you have CTF info in the object file, you
should
be able to do:

2d7518::print MyMethod

to print out the data structure. If this doesn't work, maybe try looking

at the dump with
dbx. If that doesn't work, in mdb use

2d7518,10/X

And look at the output and match it up with the MyMethod structure. 
illtrap is not
(generally) a valid instruction. As far as leaks are concerned, where is

ctrRef deleted
in the code?

max


Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email. 

www.wipro.com

Reply via email to