Bug 109060 - android-x86 64bit builds crashes due to android/gralloc_handle.h
Summary: android-x86 64bit builds crashes due to android/gralloc_handle.h
Status: RESOLVED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: libdrm (show other bugs)
Version: DRI git
Hardware: x86-64 (AMD64) other
: medium blocker
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-14 00:05 UTC by Mauro Rossi
Modified: 2019-04-17 17:16 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
draft patch that solves the crashes (1.84 KB, patch)
2018-12-14 00:05 UTC, Mauro Rossi
no flags Details | Splinter Review

Description Mauro Rossi 2018-12-14 00:05:31 UTC
Created attachment 142809 [details] [review]
draft patch that solves the crashes

Hi,
there is a series of Android apps using 32bit libs on 64bit Android that are crashing (Jackpal terminal, Sky Force, Olympus Rising, Vulkan V1, 3dmark benchmarks and many others)

The cause is the difference in size of gralloc handle structs created by 32bit libraries and 64bit architetures libraries.

The problem was observed and patched in gbm_gralloc in the past by Chih-Wei Huang, but it was not taken into account in later evolution,
now with android/gralloc_handle.h in libdrm the problem is again present,
because the handle sizes in 32bit and 64bit are again different.

The attached draft patch solves the issue, tested on all apps that were crashing
Please review and provide feedback

Mauro
Comment 1 Emil Velikov 2019-04-17 17:16:01 UTC
Seems like Rob pushed the patch, but forgot to update the bugreport - oops ;-)
Thanks for the fix gents.

commit 597725e9511f8c0405fdd8d92d749bce58c0bce3
Author: Mauro Rossi <issor.oruam@gmail.com>
Date:   Tue Dec 11 23:22:35 2018 +0100

    android: Fix 32-bit app crashing in 64-bit Android


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.