bug-binutils
[Top][All Lists]
Advanced

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

[Bug binutils/22449] New: Memory Leak in bucomm.c (ar)


From: timo-high at hotmail dot com
Subject: [Bug binutils/22449] New: Memory Leak in bucomm.c (ar)
Date: Fri, 17 Nov 2017 06:18:50 +0000

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

            Bug ID: 22449
           Summary: Memory Leak in bucomm.c (ar)
           Product: binutils
           Version: 2.30 (HEAD)
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: timo-high at hotmail dot com
  Target Milestone: ---

Created attachment 10607
  --> https://sourceware.org/bugzilla/attachment.cgi?id=10607&action=edit
File to reproduce the memory leak

I have encountered a memory leak in bucomm.c when fuzzing ar library. I have
attached the file to reproduce the memory leak.

Command used - ./ar -s $FILE

==11726== HEAP SUMMARY:
==11726==     in use at exit: 36 bytes in 1 blocks
==11726==   total heap usage: 44 allocs, 43 frees, 31,048 bytes allocated
==11726== 
==11726== 36 bytes in 1 blocks are definitely lost in loss record 1 of 1
==11726==    at 0x4C2DB8F: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==11726==    by 0x4BD907: xmalloc (xmalloc.c:147)
==11726==    by 0x407B56: template_in_dir (bucomm.c:490)
==11726==    by 0x4087C5: make_tempname (bucomm.c:519)
==11726==    by 0x405799: write_archive (ar.c:1152)
==11726==    by 0x4068C1: ranlib_only.part.2 (ar.c:1445)
==11726==    by 0x403912: ranlib_only (ar.c:1439)
==11726==    by 0x403912: main (ar.c:767)
==11726== 
==11726== LEAK SUMMARY:
==11726==    definitely lost: 36 bytes in 1 blocks
==11726==    indirectly lost: 0 bytes in 0 blocks
==11726==      possibly lost: 0 bytes in 0 blocks
==11726==    still reachable: 0 bytes in 0 blocks
==11726==         suppressed: 0 bytes in 0 blocks
==11726== 
==11726== For counts of detected and suppressed errors, rerun with: -v
==11726== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

-- 
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]