pspp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Refcount struct dictionary ?


From: Ben Pfaff
Subject: Re: Refcount struct dictionary ?
Date: Sun, 23 Sep 2018 23:00:17 -0700
User-agent: Mutt/1.5.23 (2014-03-12)

On Sun, Sep 23, 2018 at 03:02:34PM +0200, John Darrington wrote:
> The following patch fixes some (potentially fatal) use-after-free errors in 
> the gui.
> It does however do a lot more copying of dictionary which is in most 
> instances 
> unnecessary.
> 
> An alternative would be to refcount the dictionary in much the same way as we 
> do
> struct ccase.

It seems like refcounting the dictionary will require a lot of care to
find all the places where a dictionary gets modified to un-share.  I
seem to recall that the variables in a dictionary have a reference
upward to the dictionary, too.

I'm not saying that refcounting the dictionary is the wrong choice but
it needs to be done carefully.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]