[MPlayer-dev-eng] mplayer -pie and libbluray
Alexander Roalter
alex at roalter.it
Wed Aug 15 20:54:45 CEST 2012
On 08/15/2012 08:27 PM, Reimar Döffinger wrote:
>
> 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 can make a small test app and a test.so, and both do strdup. It works
even if I use PIE linking.
But if I do add bd_open("/mnt/bd", NULL); and link against libbluray,
then also the test application segfaults (with PIE) or works OK (without
PIE).
Running gdb on it... the bdpath=0xffffffff8201980 is an additional
printf I inserted to see the %p of the strdup'ed string.
bdpath = 0xfffffffff8201980
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7686f54 in vfprintf () from /lib64/libc.so.6
(gdb) backtrace
#0 0x00007ffff7686f54 in vfprintf () from /lib64/libc.so.6
#1 0x00007ffff76adea2 in vsnprintf () from /lib64/libc.so.6
#2 0x00007ffff79d195c in str_printf (
fmt=0x7ffff79d2073 "%s/AACS/Unit_Key_RO.inf") at util/strutl.c:40
#3 0x00007ffff79b2d2a in _libaacs_required (bd=0x7ffff8200010)
at libbluray/bluray.c:648
#4 0x00007ffff79b3048 in _libaacs_open (bd=0x7ffff8200010,
keyfile_path=0x0)
at libbluray/bluray.c:708
#5 0x00007ffff79b3ce9 in bd_open (device_path=0x7ffff7ffea04 "/mnt/bd",
keyfile_path=0x0) at libbluray/bluray.c:1074
#6 0x00007ffff7ffe8e1 in main ()
--
Cheers,
Alex
More information about the MPlayer-dev-eng
mailing list