bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/21880] Memory leak in demangle


From: markus at trippelsdorf dot de
Subject: [Bug binutils/21880] Memory leak in demangle
Date: Tue, 26 Sep 2017 14:48:22 +0000

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

Markus Trippelsdorf <markus at trippelsdorf dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
   Last reconfirmed|                            |2017-09-26
         Resolution|WONTFIX                     |---
     Ever confirmed|0                           |1

--- Comment #8 from Markus Trippelsdorf <markus at trippelsdorf dot de> ---
gcc's PR81680-81684 are all binutils c++filt only bugs.

(direct libiberty test:)
address@hidden libiberty % valgrind ./a.out __H1r_H1
==9297== Memcheck, a memory error detector
==9297== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==9297== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==9297== Command: ./a.out __H1r_H1
==9297== 
failed demangling
Failed: __H1r_H1
==9297== 
==9297== HEAP SUMMARY:
==9297==     in use at exit: 0 bytes in 0 blocks
==9297==   total heap usage: 1 allocs, 1 frees, 1,024 bytes allocated
==9297== 
==9297== All heap blocks were freed -- no leaks are possible

(binutils c++filt:)
address@hidden libiberty % valgrind --leak-check=full c++filt __H1r_H1 
==9426== Memcheck, a memory error detector
==9426== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==9426== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==9426== Command: c++filt __H1r_H1
==9426== 
__H1r_H1
==9426== 
==9426== HEAP SUMMARY:
==9426==     in use at exit: 9 bytes in 2 blocks
==9426==   total heap usage: 6 allocs, 4 frees, 1,105 bytes allocated
==9426== 
==9426== 9 (8 direct, 1 indirect) bytes in 1 blocks are definitely lost in loss
record 2 of 2
==9426==    at 0x4834C0F: malloc (vg_replace_malloc.c:299)
==9426==    by 0x493D437: xmalloc (in
/usr/lib64/binutils/x86_64-pc-linux-gnu/git/libbfd-2.29.51.20170917.so)
==9426==    by 0x492B62C: demangle_template (in
/usr/lib64/binutils/x86_64-pc-linux-gnu/git/libbfd-2.29.51.20170917.so)
==9426==    by 0x492CD1B: demangle_signature (in
/usr/lib64/binutils/x86_64-pc-linux-gnu/git/libbfd-2.29.51.20170917.so)
==9426==    by 0x492DDCA: internal_cplus_demangle (in
/usr/lib64/binutils/x86_64-pc-linux-gnu/git/libbfd-2.29.51.20170917.so)
==9426==    by 0x4928A5A: cplus_demangle (in
/usr/lib64/binutils/x86_64-pc-linux-gnu/git/libbfd-2.29.51.20170917.so)
==9426==    by 0x401F5D: demangle_it (in
/usr/x86_64-pc-linux-gnu/binutils-bin/git/c++filt)
==9426==    by 0x401BA5: main (in
/usr/x86_64-pc-linux-gnu/binutils-bin/git/c++filt)
==9426== 
==9426== LEAK SUMMARY:
==9426==    definitely lost: 8 bytes in 1 blocks
==9426==    indirectly lost: 1 bytes in 1 blocks
==9426==      possibly lost: 0 bytes in 0 blocks
==9426==    still reachable: 0 bytes in 0 blocks
==9426==         suppressed: 0 bytes in 0 blocks

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]