From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [PATCH 0/2] Fix memory leak with .debug_types
Date: Thu, 23 Oct 2025 11:17:32 -0600 [thread overview]
Message-ID: <20251023-mdict-free-v1-0-ad02b2bdd549@tromey.com> (raw)
I noticed a while ago that nothing in the tree ever calls mdict_free,
and looking deeper I found that .debug_types has a longstanding memory
leak.
Now that blockvectors are heap-allocated, this is relatively easy to
fix, which is what this series does.
Regression tested on x86-64 Fedora 40.
Signed-off-by: Tom Tromey <tom@tromey.com>
---
Tom Tromey (2):
Two bug fixes in mdict_free
Free multidicts from blockvector
gdb/block.c | 6 ++++++
gdb/block.h | 2 ++
gdb/dictionary.c | 13 +++++++++----
3 files changed, 17 insertions(+), 4 deletions(-)
---
base-commit: 8eeb52e3c7701f03711d51a2209c39d85d109500
change-id: 20251023-mdict-free-47eec1d7635d
Best regards,
--
Tom Tromey <tom@tromey.com>
next reply other threads:[~2025-10-23 17:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-23 17:17 Tom Tromey [this message]
2025-10-23 17:17 ` [PATCH 1/2] Two bug fixes in mdict_free Tom Tromey
2025-10-23 18:26 ` Simon Marchi
2025-10-23 18:32 ` Simon Marchi
2025-10-23 18:49 ` Tom Tromey
2025-10-23 17:17 ` [PATCH 2/2] Free multidicts from blockvector Tom Tromey
2025-10-23 18:31 ` Simon Marchi
2025-10-23 18:52 ` Tom Tromey
2025-10-24 14:08 ` Tom Tromey
2025-10-24 16:25 ` Simon Marchi
2025-10-24 18:04 ` Tom Tromey
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=20251023-mdict-free-v1-0-ad02b2bdd549@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@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: link
Be 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