[vlc-devel] commit: Detach the children at object destruction ( Rafaël Carré )

Rémi Denis-Courmont rdenis at simphalempin.com
Fri May 16 18:04:29 CEST 2008


Le Friday 16 May 2008 18:45:19 Pierre d'Herbemont, vous avez écrit :
> On May 16, 2008, at 5:17 PM, Rémi Denis-Courmont wrote:
> > Le Friday 16 May 2008 18:11:08 Pierre d'Herbemont, vous avez écrit :
> >> On May 16, 2008, at 4:39 PM, Rémi Denis-Courmont wrote:
> >>> Le Friday 16 May 2008 15:48:10 Pierre d'Herbemont, vous avez écrit :
> >>>>> I have a patch for that. Please review and apply.<0001-objects-
> >>>>> Protect-from-FIND_PARENT-directly-in-the-FI.patch>
> >>>>
> >>>> (without typo this time)
> >>>
> >>> This does not work. For a start, outside of the refspin, there is no
> >>> warranty
> >>> that i_refcount is in a safe, so if another thread is yielding/
> >>> releasing the
> >>> parent at the same time, you will get undefined behaviour.
> >>
> >> Well, added the forgotten spinlock locking.
> >
> > Looks horrible. I don't understand what you're trying to solve here.
>
> Trying to fix the fact that you can no longer detach from a children
> object from its parent, because p_parent is set to NULL, when parent
> is released first.

There is something badly wrong if you can be still attached to a dead object 
anyhow.

Besides, no matter what you do, there is no way to block vlc_object_destroy, 
so I cannot believe that the proposed patch could be correct.

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list