[vlc-devel] commit: DBus : Fix a segfault when access->pf_control is NULL ( Rafaël Carré )

Rafaël Carré funman at videolan.org
Wed Mar 26 00:34:50 CET 2008

Hash: SHA1

Le Tue, 25 Mar 2008 22:33:16 +0200,
Rémi Denis-Courmont <rdenis at simphalempin.com> a écrit :

> Le Tuesday 25 March 2008 12:19:47 Rafaël Carré, vous avez écrit :
> > >  > DBus : Fix a segfault when access->pf_control is NULL
> > >
> > > I believe pf_control is mandatory. Please fix the broken plugins
> > > instead of writing kludges.
> >
> > I put that on my TODO list.
> I still don't see the point of this gross hack. It does not even seem
> to fix the problem - an access might as well set the pf_control
> callback _before_ it's ready - invoking Control before Open returns
> VLC_SUCCESS is simply broken; checking pf_control is pointless.
> As far as I understand, there is a conflict with the two usages of
> the object tree (vlc_object_attach()). One usage is to make the
> object "find-able": the object should be attached _after_ it's
> initialized, and detached before it's destroyed. Another usage is to
> inherit variables: the object should be attached before it starts
> initializing, and detached after it's deinitialized.
> In the particular case of the access objects, checking for
> p_access->p_module would work a lot better, except for locking.
> However, using callbacks (or variables) from a plugin from some
> foobar third party thread is anyway plain wrong. Most if not all
> plugins have no provision for re-entrancy whatsoever. Only the owner
> thread, i.e. the corresponding stream/input thread, should be allowed
> to do that.

Thanks for the clarification, I will think about how I can access the
needed information before just removing the offending code.

- -- 
Rafaël Carré
Version: GnuPG v2.0.8 (FreeBSD)


More information about the vlc-devel mailing list