[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/22203] New: memory leak in elfxx-x86.c and _bfd_generic_re
From: |
luanjunchao at 163 dot com |
Subject: |
[Bug binutils/22203] New: memory leak in elfxx-x86.c and _bfd_generic_read_minisymbols in binutils 2.29 |
Date: |
Mon, 25 Sep 2017 11:50:58 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=22203
Bug ID: 22203
Summary: memory leak in elfxx-x86.c and
_bfd_generic_read_minisymbols in binutils 2.29
Product: binutils
Version: 2.29
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: luanjunchao at 163 dot com
Target Milestone: ---
Created attachment 10475
--> https://sourceware.org/bugzilla/attachment.cgi?id=10475&action=edit
poc of memory leak
When I run "nm-new -a -A -D -l -n -P -r -S --size-sort --special-syms
--synthetic --with-symbol-versions leak.elf", it shows that there are memory
leaks as follows:
==12910==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 495 byte(s) in 1 object(s) allocated from:
#0 0x7fac81cf7602 in malloc
(/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602)
#1 0x4277b7 in bfd_malloc /work/binutils-gdb-asan/bfd/libbfd.c:193
#2 0x4279b1 in bfd_zmalloc /work/binutils-gdb-asan/bfd/libbfd.c:278
#3 0x46f9ce in _bfd_x86_elf_get_synthetic_symtab
/work/binutils-gdb-asan/bfd/elfxx-x86.c:1829
#4 0x4621cf in elf_x86_64_get_synthetic_symtab
/work/binutils-gdb-asan/bfd/elf64-x86-64.c:4963
#5 0x40765a in display_rel_file /work/binutils-gdb-asan/binutils/nm.c:1155
#6 0x408205 in display_file /work/binutils-gdb-asan/binutils/nm.c:1318
#7 0x409dcd in main /work/binutils-gdb-asan/binutils/nm.c:1792
#8 0x7fac816b182f in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
Direct leak of 88 byte(s) in 1 object(s) allocated from:
#0 0x7fac81cf7602 in malloc
(/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98602)
#1 0x4277b7 in bfd_malloc /work/binutils-gdb-asan/bfd/libbfd.c:193
#2 0x431a39 in _bfd_generic_read_minisymbols
/work/binutils-gdb-asan/bfd/syms.c:814
#3 0x4072ec in display_rel_file /work/binutils-gdb-asan/binutils/nm.c:1107
#4 0x408205 in display_file /work/binutils-gdb-asan/binutils/nm.c:1318
#5 0x409dcd in main /work/binutils-gdb-asan/binutils/nm.c:1792
#6 0x7fac816b182f in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
SUMMARY: AddressSanitizer: 583 byte(s) leaked in 2 allocation(s).
The leak.elf is attached.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/22203] New: memory leak in elfxx-x86.c and _bfd_generic_read_minisymbols in binutils 2.29,
luanjunchao at 163 dot com <=