Build-time test failure on 32-bit: object class 'MetaStartupSequence' has no property named '<corrupted data>'
I recently updated Debian's mutter package from 41.1 to slightly after 41.2 (specifically 5d0c2663) and experienced this build-time test failure on 32-bit architectures armel, armhf and i386:
Bail out! GLib-GObject-FATAL-CRITICAL: g_object_new_is_valid_property: object class 'MetaStartupSequence' has no property named '<corrupted data goes here>'
64-bit architectures amd64, arm64, ppc64el and s390x built successfully.
I think this is a result of incorrect use of varargs when calling g_object_new()
: the timestamp
property is a guint64
, but in a few call sites it is passed as a guint32
(or equivalently a uint32_t
). On some architectures (ABI-dependent) this can mean that the caller pushes 32 bits of data onto the stack, and the callee pops 64 bits of data off the stack. This can cause the NULL
terminator of the varargs to be ignored, which makes the callee treat the uninitialized sizeof(char *)
bytes that follow as a pointer to a property name. This is unlikely to end well.