GLib assumes that uintptr_t is the same as size_t
GLib up to at least 2.74.x assumes that uintptr_t
is the same as size_t
, but this is not guaranteed by Standard C, and we are starting to see architectures where it is not true.
Notably, Arm Morello and other CHERI systems have a 64-bit address space (therefore 64-bit size_t
) with 128-bit pointers (128-bit void *
and (u)intptr_t
), in which the pointers contain metadata, not just the address.
@arichardson has been looking at making GLib compile and pass tests on Arm Morello, which involves removing this assumption.