NVIDIA PRIME offloading patches support breaks ABI on the stable branch
The recent addition to support PRIME offloading with the NVIDIA closed-source driver have been backported/cherry-picked in the stable branch as part of !212 (merged), but those cause an ABI change which may lead to a crash on the Xserver on 32bit systems.
Namely the two offending commits are:
- 8449c862 miext/sync: Fix needless ABI change
- 82f01ad7 xsync: Add resource inside of SyncCreate, export SyncCreate
commit 82f01ad7 adds a new field
Bool initialized to
_SyncObject, but Bool is defined as an integer and therefore that breaks the ABI on 64bit systems.
commit 8449c862 tries to fix that by moving the newly added field at the end of the
_SyncObject structure, but that breaks ABI on 32bit systems because the size increases and
_SyncObject is embedded in other structures (e.g. downstream bug https://bugzilla.redhat.com/1752211)
A possible solution suggested by @daenzer would be to use a
char instead of a
initialized and move it back to where it was initially with commit 82f01ad7 so that it can fall between the data alignment and keep the size of the structure unchanged for both 32 and 64 bits architectures.