Bug#662057: [s390x] bug in gobject/gvaluetransform.c

Philipp Kern pkern at debian.org
Sat Mar 3 21:27:59 UTC 2012


Source: glib2.0
Version: 2.31.18-1
Severity: important
Tags: patch
User: debian-s390 at lists.debian.org
Usertags: s390x

gobject/gvaluetransform.c causes the value/transform testcase
(gobject/tests/param.c) to fail on s390x, because of this:

--- glib2.0-2.31.18.orig/gobject/gvaluetransform.c
+++ glib2.0-2.31.18/gobject/gvaluetransform.c
@@ -140,7 +140,7 @@ value_transform_##func_name (const GValu
 DEFINE_BOOL_CHECK (int_bool,    v_int);
 DEFINE_BOOL_CHECK (uint_bool,   v_uint);
 DEFINE_BOOL_CHECK (long_bool,   v_long);
-DEFINE_BOOL_CHECK (ulong_bool,  v_uint);
+DEFINE_BOOL_CHECK (ulong_bool,  v_ulong);
 DEFINE_BOOL_CHECK (int64_bool,  v_int64);
 DEFINE_BOOL_CHECK (uint64_bool, v_uint64);

It tries to read a GValue's v_uint member of a ULONG Gvalue to convert that to
a boolean.  Because s390x is 64bit big endian, the v_uint member is 0 whereas
the v_ulong member has the right value.  Basically the long is too small to be
visible in the int.  The above patch causes the gobject testsuite to succeed.
(This doesn't mean that the complete glib testsuite succeeds.)





More information about the pkg-gnome-maintainers mailing list