[Spice-devel] leaking drawables

Alexander Larsson alexl at redhat.com
Wed Sep 8 12:24:19 PDT 2010


On Tue, 2010-09-07 at 17:08 +0200, Gerd Hoffmann wrote:
> Hi,
> 
> > This happens for several consecutive resource releases. Looking at what
> > actually gets released by the driver we see that the resources are freed
> > in the same order as they were release, its just that a chunk of
> > resources are missing here and there.
> 
> Try the attached patch.  I'm pretty sure qxl just overruns the release 
> ring, making complete release lists disappear now and then.

This doesn't seem right. The ring doesn't wrap cons and prod, as they
are incremented. Instead they are % num_items when used as indexes. This
means that its ok to have the ring be completely full (and indeed, the
IS_FULL macro just checks prod - cons == num_items).

Thus, prod - cons means we're pushing to the last item in the ring.

And, testing with this patch I still see the leak.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
       alexl at redhat.com            alexander.larsson at gmail.com 
He's an otherworldly white trash Green Beret fleeing from a secret government 
programme. She's a transdimensional winged wrestler from out of town. They 
fight crime! 



More information about the Spice-devel mailing list