From: Simon Marchi <simark@simark.ca>
To: Tom Tromey <tromey@adacore.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] Fix leak with internal functions
Date: Mon, 22 Apr 2024 14:47:02 -0400 [thread overview]
Message-ID: <92ab0ed6-a53a-46af-a91d-ec652ba31bcb@simark.ca> (raw)
In-Reply-To: <20240422180538.3067094-1-tromey@adacore.com>
On 4/22/24 2:05 PM, Tom Tromey wrote:
> diff --git a/gdb/value.c b/gdb/value.c
> index 1bd180a62cc..58e4a975485 100644
> --- a/gdb/value.c
> +++ b/gdb/value.c
> @@ -1882,6 +1882,11 @@ struct internalvar
> : name (std::move (name))
> {}
>
> + ~internalvar ()
> + {
> + clear_internalvar (this);
> + }
This struct should probably be made non-movable/assignable/copyable/etc
(or the appropriate ones should be implemented, if they are needed).
Simon
prev parent reply other threads:[~2024-04-22 18:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-22 18:05 Tom Tromey
2024-04-22 18:47 ` Simon Marchi [this message]
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=92ab0ed6-a53a-46af-a91d-ec652ba31bcb@simark.ca \
--to=simark@simark.ca \
--cc=gdb-patches@sourceware.org \
--cc=tromey@adacore.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).