On Thu, Oct 15, 2009 at 17:43, Simon van der Linden
<svdlin...@src.gnome.org> wrote:
> On Thu, 2009-10-15 at 17:27 +0100, Tomeu Vizoso wrote:
>> have found a double free and I'm not sure what is the proper fix.
>
> Thanks for finding it, Tomeu!
>
>> To reproduce, instantiate a boxed: python -c "from gi.repository
>> import Pango; Pango.FontDescription()"
>
> I could reproduce it. It has already been fixed a few weeks ago in my
> local branch. I need to push it ASAP, I know, I know, I know; please
> wait a few more days ;-)

Don't worry, I tried keeping me busy with other stuff but failed to
resist the temptation ;)

>> Any ideas?
>
> I experienced other problems with the GC and boxed wrappers, and IIRC,
> it was caused by the way those wrappers are allocated and initialized.

I suspect that after it is released for the first time, its memory is
overwritten in such a way that tp_flags says that it's GC'ed. Then,
the second time it is going to be released, Python thinks it is GC'ed
and does this weird stuff.

Regards,

Tomeu

> Normally, in the invoke method, the newly-created boxed wrapper's
> reference count wouldn't need to be incremented (IIRC, again; I haven't
> had time to look at the code, sorry).
>
> Cheers,
>
> --
> Simon van der Linden
>
>
>



-- 
«Sugar Labs is anyone who participates in improving and using Sugar.
What Sugar Labs does is determined by the participants.» - David
Farning
_______________________________________________
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to