This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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 
  
  




  
  
  
  


  
  
  
  


  
  
  
  



 
 
 
 


Attachment: content1.1.0.txt
Description: Binary data

Attachment: mtrace.patch
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]