From 2aed76fc944dc9c4517ec1f9209c39d9a1ae78e4 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Wed, 14 Dec 2022 23:55:18 +0000 Subject: [PATCH] Fix GHashTableIter layout for CHERI targets Last field needs to be pointer-size to match GHashTableIter. This happened to work for most architecture due to alignment padding/pointer size, but for CHERI targets with 128-bit pointers RealIter ends up being smaller than GHashTableIter. Helps: https://gitlab.gnome.org/GNOME/glib/-/issues/2842 --- glib/ghash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glib/ghash.c b/glib/ghash.c index 132e3ac5e..eafb37bb3 100644 --- a/glib/ghash.c +++ b/glib/ghash.c @@ -292,7 +292,7 @@ typedef struct gpointer dummy2; gint position; gboolean dummy3; - gint version; + gintptr version; } RealIter; G_STATIC_ASSERT (sizeof (GHashTableIter) == sizeof (RealIter));