[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/22032] New: Memory leak in bfd_close_all_done
From: |
hjl.tools at gmail dot com |
Subject: |
[Bug binutils/22032] New: Memory leak in bfd_close_all_done |
Date: |
Tue, 29 Aug 2017 17:51:25 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=22032
Bug ID: 22032
Summary: Memory leak in bfd_close_all_done
Product: binutils
Version: 2.30 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: hjl.tools at gmail dot com
Target Milestone: ---
address@hidden build-x86_64-linux]$ cat /tmp/x.c
#include <stdio.h>
int
main ()
{
printf ("Hello\n");
return 0;
}
address@hidden build-x86_64-linux]$ gcc -g /tmp/x.c
address@hidden build-x86_64-linux]$ ./binutils/objdump -x -Wl -R -SD a.out
....
=================================================================
==2962==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 1821 byte(s) in 23 object(s) allocated from:
#0 0x7f94efcc0830 in malloc (/lib64/libasan.so.4+0xde830)
#1 0x51e082 in bfd_malloc
/export/gnu/import/git/sources/binutils-gdb/bfd/libbfd.c:193
Direct leak of 1200 byte(s) in 8 object(s) allocated from:
#0 0x7f94efcc0c20 in realloc (/lib64/libasan.so.4+0xdec20)
#1 0x51e117 in bfd_realloc
/export/gnu/import/git/sources/binutils-gdb/bfd/libbfd.c:235
Direct leak of 794 byte(s) in 1 object(s) allocated from:
#0 0x7f94efcc0830 in malloc (/lib64/libasan.so.4+0xde830)
#1 0x51e082 in bfd_malloc
/export/gnu/import/git/sources/binutils-gdb/bfd/libbfd.c:193
#2 0x6334f15554d577ff (<unknown module>)
Direct leak of 224 byte(s) in 1 object(s) allocated from:
#0 0x7f94efcc0830 in malloc (/lib64/libasan.so.4+0xde830)
#1 0x51e082 in bfd_malloc
/export/gnu/import/git/sources/binutils-gdb/bfd/libbfd.c:193
#2 0x7ffd76046f3f (<unknown module>)
Indirect leak of 197 byte(s) in 1 object(s) allocated from:
#0 0x7f94efcc0830 in malloc (/lib64/libasan.so.4+0xde830)
#1 0x51e082 in bfd_malloc
/export/gnu/import/git/sources/binutils-gdb/bfd/libbfd.c:193
#2 0x7ffd7604756f (<unknown module>)
SUMMARY: AddressSanitizer: 4236 byte(s) leaked in 34 allocation(s).
address@hidden build-x86_64-linux]$
bfd_close_all_done is missing:
if (! BFD_SEND (abfd, _close_and_cleanup, (abfd)))
return FALSE;
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug binutils/22032] New: Memory leak in bfd_close_all_done,
hjl.tools at gmail dot com <=