This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/6] Call dummy_frame_dtor_ftype also from remove_dummy_frame


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]