[Bug 104642] Android: NULL pointer dereference with i965 mesa-dev, seems build_id_length related

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Jan 22 16:45:13 UTC 2018


https://bugs.freedesktop.org/show_bug.cgi?id=104642

--- Comment #5 from Stephan Gerhold <stephan at gerhold.net> ---
This commit should fix it properly:
https://github.com/me176c-dev/android_external_mesa/commit/07b637bcef660b3bf12d6854153692026ef3c698

Can you test this patch, Mauro?

The main problem is that the build-id code doesn't handle the (unusual) case
that there is an offset between the base address and the LOAD segment (as
indicated by the virtual address in the ELF header). On Android 32-bit, the
offset comes from the "relocation_packer"[1] in the Android build system. It
seems to re-pack the binary and adds the offset for whatever reason.

The ELF header tells us the offset so we just need to look through the header
and add the offset to the base address (dlpi_addr) before comparing it to
dli_fbase.

[1]
https://android.googlesource.com/platform/bionic/+/master/tools/relocation_packer

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20180122/13ad48f4/attachment.html>


More information about the intel-3d-bugs mailing list