Bug#700015: libx11-6: crashes on systems using Mali graphics
good news! i make quick and dirty hacks and this work system wide.
details:
my libMali.so have one nop instruction in function _init and two
unused bytes in section .init;
i disassemble libMali.so to find addresses of XInitThreads thunk and
function called from _init;
i increase section .init lenght to +2;
i make simple dummy asm code:
.thumb
/*
fake _init
*/
.org 0x02476c
nop
blx XInitThread
bl sub_x
nop
/*
fake XInitThreads thunk
*/
.org 0x024d14
XInitThread:
nop
/*
fake subfunction for _init
*/
.org 0x0268e0
sub_x:
nop
i compile this code and make objdump -d of result and have:
a.out: file format elf32-littlearm
Disassembly of section .text:
00000000 <XInitThread-0x24d14>:
...
2476c: 46c0 nop ; (mov r8, r8)
2476e: f000 ead2 blx 24d14 <XInitThread>
24772: f002 f8b5 bl 268e0 <sub_x>
24776: 46c0 nop ; (mov r8, r8)
...
00024d14 <XInitThread>:
24d14: 46c0 nop ; (mov r8, r8)
...
000268e0 <sub_x>:
268e0: 46c0 nop ; (mov r8, r8)
i replace call to subfunction and nop in _init to generated code;
and in result i have needed - XInitThreads call after libMali.so load;
2013/3/4 Michal Suchanek <hramrach@gmail.com>:
> On 4 March 2013 09:17, Сергей И. Королев <exception0x0d@gmail.com> wrote:
>> in my instalation gnome-shell, empathy, evolution, emerillon and some
>> other application affected to this bug. i think about system way
>> workaround. how about patch libMali.so to call XInitThreads in init
>> after library loaded?
>>
>
> That's presumably possible but you will have to binary-patch the
> library. There is no source.
>
> Also it's good idea to try the workaround with gdb to make sure you
> really have the same problem.
>
> Thanks
>
> Michal
Reply to: