[MPlayer-dev-eng] mplayer -pie and libbluray
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Wed Aug 15 21:31:18 CEST 2012
On Wed, Aug 15, 2012 at 09:00:03PM +0200, Jose Alberto Reguero wrote:
> On Miércoles, 15 de agosto de 2012 20:27:42 Reimar Döffinger escribió:
> > On Wed, Aug 15, 2012 at 07:45:59PM +0200, Alexander Roalter wrote:
> > > On 08/15/2012 07:14 PM, Reimar Döffinger wrote:
> > > >Hello,
> > > >
> > > >On Wed, Aug 15, 2012 at 11:51:29AM +0200, Alexander Roalter wrote:
> > > >>When I compile a recent mplayer (on x86_64) and start with br://1, I
> > > >>get a segfault in libbluray, because a strdup called there doesn't
> > > >>deliver a valid result.
> > > >
> > > >I disabled it again by default, as Ivan reminded me there is another
> > > >issue open...
> > > >Can you in any way help debug this?
> > > >I am running Debian unstable x86_64 and it works just fine (I've used
> > > >this
> > > >patch since about March without any issues...).
> > >
> > > I'm using a rather old-ish Opensuse 11.2.
> > >
> > > If you point me in some direction (what to look for, e.g. loader,
> > > libraries etc.) I can certainly help. Did you also run libbluray?
> > > Perhaps it is something specific to that lib...
> >
> > Yes, I tried playing a bluray, with both br:// and bd:// just to be sure.
> > I can't know for sure it hit the code-path that caused your issue.
> > Something like a backtrace of the crash and/or strdup and what the
> > pointer value looks like or so might help.
> > Maybe some kind of minimal reproduction case, like
> > char *a(void){ return strdup("test") };
> > compiled to a .so and a normal program compiled as PIE linking
> > against it to see if that also triggers the issue?
> > Or maybe figure out how address randomization is configured on your
> > system? Maybe changing that will determine if there is a problem or not?
> > However I can't really understand why it would work in valgrind,
> > except that I'd guess it ends up not using address randomization.
>
> I have the same problem with libbluray and another program. I build libbluray
> with:
>
> CFLAGS = -D_GNU_SOURCE
>
> and the problem is solved.
You should contact them instead and tell them to compile with
-Werror-implicit-function-declaration.
Truncating/sign-extending pointers by accident is not fun.
More information about the MPlayer-dev-eng
mailing list