From: Pedro Alves <palves@redhat.com>
To: Tom Tromey <tromey@adacore.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 5/5] Fix memory leak in exception code
Date: Thu, 25 Apr 2019 18:06:00 -0000 [thread overview]
Message-ID: <30e99361-c252-53e2-ec7c-5a6bc7301a3f@redhat.com> (raw)
In-Reply-To: <20190425165256.31226-6-tromey@adacore.com>
On 4/25/19 5:52 PM, Tom Tromey wrote:
> PR gdb/24475 concerns a memory leak coming from gdb's exception
> handling code.
>
> The leak occurs because throw_exception_sjlj does not arrange to
> destroy the exception object it is passed. However, because
> gdb_exception has a destructor, it's undefined to longjmp in this
> situation.
>
> This patch fixes the problem by avoiding the need to run any
> destructors in gdb_rl_callback_handler, by making the gdb_exception
> "static".
>
Why fix it like this, instead of fixing it like in the guile patch?
I'd think you could even use a common POD type for both guile and here?
Thanks,
Pedro Alves
next prev parent reply other threads:[~2019-04-25 18:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-25 16:53 [PATCH 0/5] More exception-handling improvements Tom Tromey
2019-04-25 16:53 ` [PATCH 1/5] Remove exception_none Tom Tromey
2019-04-25 16:53 ` [PATCH 2/5] Make SJLJ exceptions more efficient Tom Tromey
2019-04-25 16:53 ` [PATCH 3/5] Avoid undefined behavior in Guile exception handling Tom Tromey
2019-04-25 16:58 ` [PATCH 5/5] Fix memory leak in exception code Tom Tromey
2019-04-25 18:06 ` Pedro Alves [this message]
2019-04-25 18:18 ` Tom Tromey
2019-04-25 18:30 ` Tom Tromey
2019-04-25 18:38 ` Pedro Alves
2019-04-25 18:50 ` Tom Tromey
2019-04-25 16:58 ` [PATCH 4/5] Make exception handling more efficient Tom Tromey
2019-04-25 18:08 ` [PATCH 0/5] More exception-handling improvements Pedro Alves
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=30e99361-c252-53e2-ec7c-5a6bc7301a3f@redhat.com \
--to=palves@redhat.com \
--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