Skip to content

Commit c747dbb

Browse files
Michel DänzerMichel Dänzer
Michel Dänzer
authored and
Michel Dänzer
committed
miext/sync: Make struct _SyncObject::initialized fully ABI compatible
With a 32-bit build, putting the initialized field at the end of the struct bumped the struct size from 20 bytes to 24, changing the layout of other structs embedding struct _SyncObject. While this would be acceptable on master, it caused crashes with 1.20. Making the initialized field a char and putting it in the hole before the beingDestroyed field restores the 32-bit ABI as well. Fixes https://gitlab.freedesktop.org/xorg/xserver/issues/892 Reviewed-by: Aaron Plattner <[email protected]> Reviewed-by: Alex Goins <[email protected]> (cherry picked from commit 0d8cc7bb180468fee72330f40d87f6e9db7b42c0)
1 parent 5aadaac commit c747dbb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

miext/sync/misyncstr.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ struct _SyncObject {
4343
struct _SyncTriggerList *pTriglist; /* list of triggers */
4444
XID id; /* resource ID */
4545
unsigned char type; /* SYNC_* */
46+
unsigned char initialized; /* FALSE if created but not initialized */
4647
Bool beingDestroyed; /* in process of going away */
47-
Bool initialized; /* FALSE if created but not initialized */
4848
};
4949

5050
typedef struct _SyncCounter {

0 commit comments

Comments
 (0)