GHash: Don't use SMALL_ENTRY_SIZE for CHERI

The code for SMALL_ENTRY_SIZE assumes pointers are no larger than 8 bytes,
so instead of trying to make it work disable the optimization for now.

Helps: https://gitlab.gnome.org/GNOME/glib/-/issues/2842
Co-authored-by: Graeme Jenkinson <graeme@capabilitieslimited.co.uk>
This commit is contained in:
Alex Richardson 2022-12-14 23:55:18 +00:00
parent 5d8ecac1ec
commit 147777e342

View File

@ -251,7 +251,8 @@
#define BIG_ENTRY_SIZE (SIZEOF_VOID_P)
#define SMALL_ENTRY_SIZE (SIZEOF_INT)
#if SMALL_ENTRY_SIZE < BIG_ENTRY_SIZE
/* NB: The USE_SMALL_ARRAYS code assumes pointers are at most 8 bytes. */
#if SMALL_ENTRY_SIZE < BIG_ENTRY_SIZE && BIG_ENTRY_SIZE <= 8
# define USE_SMALL_ARRAYS
#endif