This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/6] Call dummy_frame_dtor_ftype also from remove_dummy_frame
- From: Pedro Alves <palves at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>, gdb-patches at sourceware dot org
- Date: Wed, 13 May 2015 13:57:18 +0100
- Subject: Re: [PATCH 2/6] Call dummy_frame_dtor_ftype also from remove_dummy_frame
- Authentication-results: sourceware.org; auth=none
- References: <20150508202119 dot 15830 dot 18218 dot stgit at host1 dot jankratochvil dot net> <20150508202128 dot 15830 dot 40142 dot stgit at host1 dot jankratochvil dot net>
On 05/08/2015 09:21 PM, Jan Kratochvil wrote:
> Hi,
>
> there was now a leak-like bug that if dummy_frame "disappeared" by
> remove_dummy_frame then its destructor was not called. For example in the case
> of 'compile code' dummy frames the injected objfile would never get freed after
> some inferior longjmp out of the injected code.
So the real fix here is this bit, right?
> /* Arbitrary data that is passed to DTOR. */
> @@ -96,6 +96,9 @@ remove_dummy_frame (struct dummy_frame **dummy_ptr)
> {
> struct dummy_frame *dummy = *dummy_ptr;
>
> + if (dummy->dtor != NULL)
> + dummy->dtor (dummy->dtor_data, 0);
> +
I'm not seeing where registers_valid is used anywhere in this patch.
Guess it'll be used in follow up patches.
(A clearer patch split would have added the missing dummy->dtor call
in this patch, and left the registers_valid addition to a separate
patch that needs that.)
/me goes try to understand the rest of the series.
Thanks,
Pedro Alves