Fwd: Returned post for libc-alpha@sourceware.org

SHOBHIT SRIVASTAVA shobhit.s@samsung.com
Thu Sep 16 05:42:00 GMT 2010


Hi

I have modified the mtrace perl script in order to get filename and line number information for leaks happening in DSO as well. I want to contribute this work to glibc for which I had submitted a patch to the libc-alpha mailing list. The review comments and the patch are there in the mail chain below. I am advised to seek help from the libc-help mailing list for formulating the correct patch.
I would appreciate your help regarding this. Please also tell me how to write the changelog file and any other information that I need to provide.

Hoping to hear from you soon

Thanks and regards
Shobhit Srivastava

 
 

------- Original Message -------
Sender : libc-alpha-owner@sourceware.org<libc-alpha-owner@sourceware.org>
Date : Sep 15, 2010 21:06 (GMT+09:00)
Title : Returned post for libc-alpha@sourceware.org

Hi! This is the ezmlm program. I'm managing the 
libc-alpha@sourceware.org mailing list. 

I'm sorry, your message (enclosed) was not accepted by the moderator. 
If the moderator has made any comments, they are shown below. 

>>>>> -------------------- >>>>> 
Hi, 

Your patch is missing a ChangeLog and also appears to be against 
EGLIBC sources instead of GLIBC sources. 

Please resend this email to the libc-help mailing list for help with 
these issues.  You can also follow the contribution checklist for 
information on formulating a correct patch: 

http://sources.redhat.com/glibc/wiki/Contribution%20checklist 

Regards, 
libc-alpha moderation staff 
<<<<< -------------------- <<<<< 

-------Original Message--------
 Sent: SHOBHIT SRIVASTAVA <shobhit.s@samsung.com>
 Date: Wed, 15 Sep 2010 11:08:45 +0000 (GMT)
 Subject: Enhanced mtrace perl script to detect memory leaks in DSOs

Hi  
  
I have been using libc's mtrace utility to detect simple memory leaks in my project related work. However I found that the usage of the mtrace perl script used to parse the mtrace.log file is limited to single executables only. By this I mean that if my program is dependent on a DSO and some leak is occuring inside that DSO then mtrace perl script is unable to detect it. Also the output of the mtrace perl script is not sorted in order of the leak size, thus making it difficult for the programmer to directly focus on big leaks. 
    Keeping these limitations in mind I have enhanced the mtrace perl script so that it detects leaks occuring in DSOs as well and sorts them in descending order of size. The mtrace patch for the same is attached in the mail. 
    The new script requires a file called mmapiinfo.log in the current working directory.This file contains the redirected output of cat /proc/<pid>/maps. If this file is not present then also the script will display the leaks but without the location information. 

output of mtrace when mmapiinfo.log file is present: 
Memory not freed: 
----------------- 
   Address     Size     Caller 
0x00011400     0x28  at /home/shobhit/mtrace-0.1/testsuite/libmore.c:14 
0x000113a0     0x28  at /home/shobhit/mtrace-0.1/testsuite/libHello.c:14 
0x000113d0     0x14  at /home/shobhit/mtrace-0.1/testsuite/libHello.c:26 
0x000113e8     0x14  at /home/shobhit/mtrace-0.1/testsuite/libmore.c:26 
0x00011380      0x4  at /home/shobhit/mtrace-0.1/testsuite/hello.c:10 
  
output of mtrace when mmapiinfo.log file is not present: 
Memory not freed: 
----------------- 
   Address     Size     Caller 
0x00011400     0x28  at  
0x000113a0     0x28  at  
0x000113d0     0x14  at  
0x000113e8     0x14  at  
0x00011380      0x4  at /home/shobhit/mtrace-0.1/testsuite/hello.c:10 

  
I would appreciate your views regarding this and would like to hear from you soon. 
  
Thanks and Regards 
Shobhit Srivastava 
  
  




  
  
  
  


  
  
  
  


  
  
  
  



 
 
 
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: content1.1.0.txt
Type: application/octet-stream
Size: 2026 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-help/attachments/20100916/b86d9e77/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mtrace.patch
Type: application/octet-stream
Size: 11713 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-help/attachments/20100916/b86d9e77/attachment-0001.obj>


More information about the Libc-help mailing list