[vlc-devel] Re: Threads and memory corruption

Christophe Massiot massiot at via.ecp.fr
Fri Feb 17 17:34:37 CET 2006


Hello,

On Fri, Feb 17, 2006, Olivier Aubert wrote:

> >>>> import vlc
> >>>> mc=vlc.MediaControl( [ '--verbose', '2', '--plugin-path', '/home/oaubert/src/vlc-dev' ] )
> // Dump from mediacontrol_init.c, when copying the args :
> - Arg 1 : --verbose
> - Arg 2 : 2
> - Arg 3 : --plugin-path
> - Arg 4 : /home/oaubert/src/vlc-dev
> // Dump from mediacontrol_init.c, between VLC_Create() and VLC_Init() :
> -- Arg 1 : --verbose
> -- Arg 2 : 2
> -- Arg 3 : --plugin-path
> -- Arg 4 : /home/oaubert/src/vlc-dev
> // Dump from libvlc.c, in VLC_Init, just after system_Init :
> Arg 0 : vlc
> Arg 1 : pÁ%
> Arg 2 : 2
> Arg 3 : --plugin-path
> Arg 4 : /home/oaubert/src/vlc-dev
> *** glibc detected *** corrupted double-linked list: 0x0825a7d0 ***
> 
> So there is a memory corruption occuring after VLC_Create (I am on
> linux, so system_Init is #defined as {}). And I guess that this is at
> the root of all the other stability problems that occur. 
> 
> Is there any thread wizard that could give me a hint or some guidelines
> to debug this ?

I am not sure if this is at all related, and I won't test, but you have
an allocation bug in mediacontrol_init.c :

    ppsz_argv = malloc( i_count + 2 );

Don't you mean (i_count + 2) * sizeof(char *) ? This could account for a
lot of things.
-- 
Christophe Massiot.

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list