[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-guile-ncurses] [PATCH 1/2] Add reference count to ITEM structs
From: |
Mike Gran |
Subject: |
Re: [Bug-guile-ncurses] [PATCH 1/2] Add reference count to ITEM structs contained by SCMs |
Date: |
Tue, 3 May 2016 14:11:56 +0000 (UTC) |
> On Tuesday, May 3, 2016 5:20 AM, John Darrington <address@hidden> wrote:
> > This patch (partially) fixes a bug where a segmentation violation in the
> guile library would occur after, for example the current-item had been called.
>
> The problem was, the native C item struct is shared between many SCM smobs.
> Thus, if the garbage collector is allowed to run on any one of them, it'll
> free memory which will later be needed by another.
>
> This patch fixes the problem by using the "userptr" member as a
> reference count.
Not too excited about this idea, but, it is better that the present
condition.
I'll push after I've written a test case for the test suite.
Thanks,
Mike
[Bug-guile-ncurses] [PATCH 2/2] Do not allow menu's internal data to be destroyed, until the menu itself is destroyed., John Darrington, 2016/05/03