This is the mail archive of the glibc-bugs@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]

[Bug malloc/22716] New: [PATCH] mtrace.pl: use TRACE_PRELINKING instead of TRACE_LOADED_OBJECTS


https://sourceware.org/bugzilla/show_bug.cgi?id=22716

            Bug ID: 22716
           Summary: [PATCH] mtrace.pl: use TRACE_PRELINKING instead of
                    TRACE_LOADED_OBJECTS
           Product: glibc
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: malloc
          Assignee: unassigned at sourceware dot org
          Reporter: john.ogness at linutronix dot de
  Target Milestone: ---

Created attachment 10752
  --> https://sourceware.org/bugzilla/attachment.cgi?id=10752&action=edit
patch

Patch attached.

Simple test to reproduce problem and solution:

1. Start a shell with relocation disabled:

$ setarch `uname -m` -R /bin/bash

2. Run the leaking executable with mtrace active:

$ MALLOC_TRACE=myprog.trace ./myprog

3a. View leak info with unpatched mtrace.pl:

$ ./mtrace.pl myprog myprog.trace

Memory not freed:
-----------------
           Address     Size     Caller
0x0000555555756450    0x400  at 0x555555554713

3b. View leak info with patched mtrace.pl:

$ ./mtrace-patched.pl myprog myprog.trace

Memory not freed:
-----------------
           Address     Size     Caller
0x0000555555756450    0x400  at /home/jogness/myprog.c:9

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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