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] record_latest_value: Call release_value_or_incref instead of release_value


On Sun, Mar 2, 2014 at 10:00 PM, Doug Evans <xdje42@gmail.com> wrote:
> Hi.
>
> While testing a fix for bug 16612 I was getting segvs and traced it to
> the new history-append! Scheme function.
>
> The underlying gdb value was getting prematurely freed when its
> Scheme wrapper was garbage collected, but it was still in the value
> history.
>
> I think this is because its reference counting is wrong.
> Upon return from record_latest_value, its reference count is still one.
> However it was one upon entry.  It should be two, right?
> One for the Scheme wrapper and one for the history entry.

Apologies for the followup.
I should have said "However it was one upon entry and the value had
already been released."
The value gets released when creating the Scheme wrapper.


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