[vlc-devel] [PATCH 1/7] objects: add back legacy list node

Thomas Guillem thomas at gllm.fr
Mon May 27 17:04:32 CEST 2019



On Mon, May 27, 2019, at 17:00, Rémi Denis-Courmont wrote:
> Le maanantaina 27. toukokuuta 2019, 17.45.10 EEST Thomas Guillem a écrit :
> > This has been removed from c7e98fa75a88466b94b1bafae3bac3ba5f634537 as a
> > side effect.
> 
> The object tree served exaxtly one purpose: to find other objects. We don't do 
> that anymore because it's intrinsically racy and led to unfixable bugs in RC 
> and LibVLC filters.
> 
> And this has nothing to do with finding the name of a module, which you can do 
> with module_get_name() as always.
> 
> > @@ -196,11 +212,13 @@ size_t vlc_list_children(vlc_object_t *obj,
> > vlc_object_t **restrict tab, vlc_object_internals_t *priv;
> >      size_t count = 0;
> > 
> > +    vlc_mutex_lock(&tree_lock);
> >      vlc_children_foreach(priv, vlc_internals(obj))
> >      {
> >           if (count < max)
> >               tab[count] = vlc_object_hold(vlc_externals(priv));
> >           count++;
> >      }
> > +    vlc_mutex_unlock(&tree_lock);
> >      return count;
> 
> Use after free here.

It's ok since this function is removed just after.

I can modify this patch to not touch vlc_list_children.

> 
> Nack.

I'm not sure you can decide that alone. I'm just trying to add back something you removed without asking us.

If you disagree, I will call for a vote.

> 
> -- 
> Rémi Denis-Courmont
> http://www.remlab.net/
> 
> 
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list