diff options
author | Mark Wielaard <mjw@redhat.com> | 2016-11-01 23:13:10 +0000 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2016-11-18 11:06:17 +0100 |
commit | aba19b625f34fb3d61263fe8044cf0c6d8804570 (patch) | |
tree | 311997fa8a490166875f1ec52f43f600038d1520 /zlib/ChangeLog.jit | |
parent | 9d2cdc86574bda0f1013be8cdc166d86b6d032bc (diff) | |
download | gdb-aba19b625f34fb3d61263fe8044cf0c6d8804570.zip gdb-aba19b625f34fb3d61263fe8044cf0c6d8804570.tar.gz gdb-aba19b625f34fb3d61263fe8044cf0c6d8804570.tar.bz2 |
libiberty: Fix memory leak in ada_demangle when symbol cannot be demangled.
When a symbol cannot be demangled in ada_demangle a new demangled VEC
will be allocated without deleting the demangled VEC already in use.
Running testsuite/test-demangle under valgrind will show the leak for
this entry in testsuite/demangle-expected:
# Elaborated flag (not demangled)
--format=gnat
x_E
<x_E>
11 bytes in 1 blocks are definitely lost in loss record 1 of 1
at 0x4C27BE3: malloc (vg_replace_malloc.c:299)
by 0x413FE7: xmalloc (xmalloc.c:148)
by 0x4025EC: ada_demangle (cplus-dem.c:930)
by 0x402C59: cplus_demangle (cplus-dem.c:892)
by 0x400FEC: main (test-demangle.c:317)
libiberty/ChangeLog:
* cplus-dem.c (ada_demangle): Initialize demangled to NULL and
XDELETEVEC demangled when unknown.
Diffstat (limited to 'zlib/ChangeLog.jit')
0 files changed, 0 insertions, 0 deletions