public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/30533] New: memory leaks in top.c:313
@ 2023-06-09 10:29 mengda2020 at iscas dot ac.cn
  2023-06-09 20:02 ` [Bug gdb/30533] " tromey at sourceware dot org
  0 siblings, 1 reply; 2+ messages in thread
From: mengda2020 at iscas dot ac.cn @ 2023-06-09 10:29 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 30533
           Summary: memory leaks in top.c:313
           Product: gdb
           Version: 13.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: mengda2020 at iscas dot ac.cn
  Target Milestone: ---

Hello, Binutils developers! We recently ran some fuzz testing on gdb
13.0.50.20220805-git and encountered a memory leaks bug. 

## Command To Reproduce the bug:
./gdb @/d&/-/--eiex-/---eva=\\\\\\\tYr|/Zos=

## Environment
- OS: Ubuntu 20.04
- gcc 9.4.0
- gdb 13.0.50.20220805-git

## ASAN Report 
=================================================================
==959074==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 112 byte(s) in 1 object(s) allocated from:
    #0 0x4e242d in operator new(unsigned long)
(/home/root/sp/Dataset/Binutils/binutils_aflpp/install/bin/gdb+0x4e242d)
    #1 0x1de9fa6 in ui::ui(_IO_FILE*, _IO_FILE*, _IO_FILE*)
/home/root/sp/Dataset/Binutils/binutils_aflpp/gdb/top.c:313:19
    #2 0x15bec8b in captured_main_1(captured_main_args*)
/home/root/sp/Dataset/Binutils/binutils_aflpp/gdb/main.c:676:17
    #3 0x15be28d in captured_main(void*)
/home/root/sp/Dataset/Binutils/binutils_aflpp/gdb/main.c:1319:3
    #4 0x15be058 in gdb_main(captured_main_args*)
/home/root/sp/Dataset/Binutils/binutils_aflpp/gdb/main.c:1344:7
    #5 0x4e4f12 in main
/home/root/sp/Dataset/Binutils/binutils_aflpp/gdb/gdb.c:32:10
    #6 0x7f0466250082 in __libc_start_main
/build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16

Direct leak of 48 byte(s) in 1 object(s) allocated from:
    #0 0x4e242d in operator new(unsigned long)
(/home/root/sp/Dataset/Binutils/binutils_aflpp/install/bin/gdb+0x4e242d)
    #1 0x1dea176 in ui::ui(_IO_FILE*, _IO_FILE*, _IO_FILE*)
/home/root/sp/Dataset/Binutils/binutils_aflpp/gdb/top.c:315:19
    #2 0x15bec8b in captured_main_1(captured_main_args*)
/home/root/sp/Dataset/Binutils/binutils_aflpp/gdb/main.c:676:17
    #3 0x15be28d in captured_main(void*)
/home/root/sp/Dataset/Binutils/binutils_aflpp/gdb/main.c:1319:3
    #4 0x15be058 in gdb_main(captured_main_args*)
/home/root/sp/Dataset/Binutils/binutils_aflpp/gdb/main.c:1344:7
    #5 0x4e4f12 in main
/home/root/sp/Dataset/Binutils/binutils_aflpp/gdb/gdb.c:32:10
    #6 0x7f0466250082 in __libc_start_main
/build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16

Indirect leak of 48 byte(s) in 1 object(s) allocated from:
    #0 0x4e242d in operator new(unsigned long)
(/home/root/sp/Dataset/Binutils/binutils_aflpp/install/bin/gdb+0x4e242d)
    #1 0x1de9fc1 in ui::ui(_IO_FILE*, _IO_FILE*, _IO_FILE*)
/home/root/sp/Dataset/Binutils/binutils_aflpp/gdb/top.c:313:35
    #2 0x15bec8b in captured_main_1(captured_main_args*)
/home/root/sp/Dataset/Binutils/binutils_aflpp/gdb/main.c:676:17
    #3 0x15be28d in captured_main(void*)
/home/root/sp/Dataset/Binutils/binutils_aflpp/gdb/main.c:1319:3
    #4 0x15be058 in gdb_main(captured_main_args*)
/home/root/sp/Dataset/Binutils/binutils_aflpp/gdb/main.c:1344:7
    #5 0x4e4f12 in main
/home/root/sp/Dataset/Binutils/binutils_aflpp/gdb/gdb.c:32:10
    #6 0x7f0466250082 in __libc_start_main
/build/glibc-SzIz7B/glibc-2.31/csu/../csu/libc-start.c:308:16

SUMMARY: AddressSanitizer: 208 byte(s) leaked in 3 allocation(s).

Many Thanks.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug gdb/30533] memory leaks in top.c:313
  2023-06-09 10:29 [Bug gdb/30533] New: memory leaks in top.c:313 mengda2020 at iscas dot ac.cn
@ 2023-06-09 20:02 ` tromey at sourceware dot org
  0 siblings, 0 replies; 2+ messages in thread
From: tromey at sourceware dot org @ 2023-06-09 20:02 UTC (permalink / raw)
  To: gdb-prs

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

Tom Tromey <tromey at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tromey at sourceware dot org
         Resolution|---                         |DUPLICATE
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
This is the 3rd time you have reported this same leak.
Why is that?

*** This bug has been marked as a duplicate of bug 30322 ***

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-06-09 20:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-09 10:29 [Bug gdb/30533] New: memory leaks in top.c:313 mengda2020 at iscas dot ac.cn
2023-06-09 20:02 ` [Bug gdb/30533] " tromey at sourceware dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).