tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: vlc-2.2.1 crash in module loader



On Mon, 6 Jul 2015 17:40:36 +0000 Taylor R Campbell <campbell
+netbsd-tech-pkg%mumble.net@localhost> wrote:

>    Date: Sat, 4 Jul 2015 16:00:26 +0200
>    From: "Ian D. Leroux" <idleroux%fastmail.fm@localhost>
> 
>    Program terminated with signal SIGSEGV, Segmentation fault.
>    #0  0x00007f7fcb8eab31 in ?? ()
>    (gdb) bt
>    #0  0x00007f7fcb8eab31 in ?? ()
>    #1  0x00007f7ff5ce8c59 in __cxa_finalize ()
>    #from /usr/lib/libc.so.12
>
> This usually suggests that someone tried to use atexit in a shared
> library, which doesn't work because the shared library may be unloaded
> by the time the process tries to call the atexit handlers.
> 
> The usual fix is to use __attribute__((__destructor__)) instead.  See,
> e.g., graphics/MesaLib/patches/patch-src_glsl_ralloc.c.  If you're not
> sure which atexit handler, you could run it in a debugger, set a
> breakpoint on atexit, and check the stack trace.
> 
> If that doesn't work, you might install the debug.tgz set (or rebuild
> libc with DBG=-g if you're on pre-7) to get debugging symbols for
> libc.  Last time I attacked an issue like this (which turned out to be
> an atexit abuse) I used lots of debugging printfs in rtld.

Thanks for the hints!

Some quick grepping shows that atexit is no longer used anywhere in the
vlc source tree (though it turns up in the Changelog pretty
often ...).  Of course, it might still be used in one of the packages
that vlc depends on, though in that case I'd expect it to have turned
up before now.  I note that vlc-1.x on NetBSD used to suffer from
a similar crash, which disappeared in the 2.0 and 2.1 packages.

Looks like this one isn't going to be quite that easy.

--
IDL


Home | Main Index | Thread Index | Old Index