R
rami
hi,
i am having a text file having these lines in it.I want to display
those lines in which memory has been allocated successfully for the
addresses and for which there is no matching free.
like below, address 20b20 of size 20 has no matching free like others,i
want to display this address and size with the stack trace(below of
every line cont malloc and free indicating which function it is
called).i need a perl script to do it as i m new to perl.
malloced successfully with address : 20b20 and size 20
libc.so.1`malloc+0x6c
a.out`f1+0x8
a.out`main+0x14
a.out`_start+0x5c
malloced successfully with address : 20b40 and size 20
libc.so.1`malloc+0x6c
a.out`f2+0x8
a.out`main+0x1c
a.out`_start+0x5c
freeing successfully with address : 20b40 size=20
libc.so.1`free
a.out`f2+0x38
a.out`main+0x1c
a.out`_start+0x5c
malloced successfully with address : 21328 and size 10
libc.so.1`malloc+0x6c
a.out`f3+0x8
a.out`main+0x24
a.out`_start+0x5c
freeing successfully with address: : 21328 size=10
libc.so.1`free
a.out`f3+0x38
a.out`main+0x24
a.out`_start+0x5c
_______________________________________________
i am having a text file having these lines in it.I want to display
those lines in which memory has been allocated successfully for the
addresses and for which there is no matching free.
like below, address 20b20 of size 20 has no matching free like others,i
want to display this address and size with the stack trace(below of
every line cont malloc and free indicating which function it is
called).i need a perl script to do it as i m new to perl.
malloced successfully with address : 20b20 and size 20
libc.so.1`malloc+0x6c
a.out`f1+0x8
a.out`main+0x14
a.out`_start+0x5c
malloced successfully with address : 20b40 and size 20
libc.so.1`malloc+0x6c
a.out`f2+0x8
a.out`main+0x1c
a.out`_start+0x5c
freeing successfully with address : 20b40 size=20
libc.so.1`free
a.out`f2+0x38
a.out`main+0x1c
a.out`_start+0x5c
malloced successfully with address : 21328 and size 10
libc.so.1`malloc+0x6c
a.out`f3+0x8
a.out`main+0x24
a.out`_start+0x5c
freeing successfully with address: : 21328 size=10
libc.so.1`free
a.out`f3+0x38
a.out`main+0x24
a.out`_start+0x5c
_______________________________________________