public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "mengda2020 at iscas dot ac.cn" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug gdb/30533] New: memory leaks in top.c:313 Date: Fri, 09 Jun 2023 10:29:39 +0000 [thread overview] Message-ID: <bug-30533-4717@http.sourceware.org/bugzilla/> (raw) 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.
next reply other threads:[~2023-06-09 10:29 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-06-09 10:29 mengda2020 at iscas dot ac.cn [this message] 2023-06-09 20:02 ` [Bug gdb/30533] " tromey at sourceware dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-30533-4717@http.sourceware.org/bugzilla/ \ --to=sourceware-bugzilla@sourceware.org \ --cc=gdb-prs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).