Your message dated Wed, 18 Jan 2012 13:32:38 +0000
with message-id <[email protected]>
and subject line Bug#653308: fixed in glib2.0 2.30.2-5
has caused the Debian Bug report #653308,
regarding value_from_ffi_type: broken on 64bit big endian
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
653308: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=653308
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: glib2.0
Version: 2.30.2-4
Severity: important
Tags: patch
User: [email protected]
Usertags: s390x

gobject/gclosure.c:value_from_ffi_type in sid does conversions that are unsafe
on big endian architectures and cause breakage at least on 64bit big endian
architectures (such as s390x, sparc64 and ppc64).  For G_TYPE_BOOLEAN you'd
get the first machine word (zeros) instead of the one in the second word
(MSB first).  Hence glib-networking's testsuite broke.

This was already fixed upstream, they replaced the function with this[1]:

static void
value_from_ffi_type (GValue *gvalue, gpointer *value)
{
  ffi_arg *int_val = (ffi_arg*) value;

  switch (g_type_fundamental (G_VALUE_TYPE (gvalue)))
    {
    case G_TYPE_INT:
      g_value_set_int (gvalue, (gint) *int_val);
      break;
    case G_TYPE_FLOAT:
      g_value_set_float (gvalue, *(gfloat*)value);
      break;
    case G_TYPE_DOUBLE:
      g_value_set_double (gvalue, *(gdouble*)value);
      break;
    case G_TYPE_BOOLEAN:
      g_value_set_boolean (gvalue, (gboolean) *int_val);
      break;
    case G_TYPE_STRING:
      g_value_set_string (gvalue, *(gchar**)value);
      break;
    case G_TYPE_CHAR:
      g_value_set_schar (gvalue, (gint8) *int_val);
      break;
    case G_TYPE_UCHAR:
      g_value_set_uchar (gvalue, (guchar) *int_val);
      break;
    case G_TYPE_UINT:
      g_value_set_uint (gvalue, (guint) *int_val);
      break;
    case G_TYPE_POINTER:
      g_value_set_pointer (gvalue, *(gpointer*)value);
      break;
    case G_TYPE_LONG:
      g_value_set_long (gvalue, (glong) *int_val);
      break;
    case G_TYPE_ULONG:
      g_value_set_ulong (gvalue, (gulong) *int_val);
      break;
    case G_TYPE_INT64:
      g_value_set_int64 (gvalue, (gint64) *int_val);
      break;
    case G_TYPE_UINT64:
      g_value_set_uint64 (gvalue, (guint64) *int_val);
      break;
    case G_TYPE_BOXED:
      g_value_set_boxed (gvalue, *(gpointer*)value);
      break;
    case G_TYPE_ENUM:
      g_value_set_enum (gvalue, (gint) *int_val);
      break;
    case G_TYPE_FLAGS:
      g_value_set_flags (gvalue, (guint) *int_val);
      break;
    case G_TYPE_PARAM:
      g_value_set_param (gvalue, *(gpointer*)value);
      break;
    case G_TYPE_OBJECT:
      g_value_set_object (gvalue, *(gpointer*)value);
      break;
    default:
      g_warning ("value_from_ffi_type: Unsupported fundamental type: %s",
                g_type_name (g_type_fundamental (G_VALUE_TYPE (gvalue))));
    }
}

At least for gboolean that looks much more sane and solves the problem.  Given
the fact that a bunch of the other cases were also problematic, I'd suggest
replacing that function with the one above.  I was told that FFI support is
pretty new, I don't know if there are more big endian issues lingering around.
The testsuite has a bunch of issues too.

If that could be fixed timely, that would be cool.  (As long as it doesn't
break anything, but the old code looked obviously wrong.)  It blocks a lot of
GNOME stuff being built on s390x, because glib-networking aborts on testsuite
failures.

Kind regards
Philipp Kern

[1] http://git.gnome.org/browse/glib/tree/gobject/gclosure.c#n1032



--- End Message ---
--- Begin Message ---
Source: glib2.0
Source-Version: 2.30.2-5

We believe that the bug you reported is fixed in the latest version of
glib2.0, which is due to be installed in the Debian FTP archive:

glib2.0_2.30.2-5.debian.tar.gz
  to main/g/glib2.0/glib2.0_2.30.2-5.debian.tar.gz
glib2.0_2.30.2-5.dsc
  to main/g/glib2.0/glib2.0_2.30.2-5.dsc
libglib2.0-0-dbg_2.30.2-5_amd64.deb
  to main/g/glib2.0/libglib2.0-0-dbg_2.30.2-5_amd64.deb
libglib2.0-0-refdbg_2.30.2-5_amd64.deb
  to main/g/glib2.0/libglib2.0-0-refdbg_2.30.2-5_amd64.deb
libglib2.0-0_2.30.2-5_amd64.deb
  to main/g/glib2.0/libglib2.0-0_2.30.2-5_amd64.deb
libglib2.0-bin_2.30.2-5_amd64.deb
  to main/g/glib2.0/libglib2.0-bin_2.30.2-5_amd64.deb
libglib2.0-data_2.30.2-5_all.deb
  to main/g/glib2.0/libglib2.0-data_2.30.2-5_all.deb
libglib2.0-dev_2.30.2-5_amd64.deb
  to main/g/glib2.0/libglib2.0-dev_2.30.2-5_amd64.deb
libglib2.0-doc_2.30.2-5_all.deb
  to main/g/glib2.0/libglib2.0-doc_2.30.2-5_all.deb
libglib2.0-udeb_2.30.2-5_amd64.udeb
  to main/g/glib2.0/libglib2.0-udeb_2.30.2-5_amd64.udeb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Michael Biebl <[email protected]> (supplier of updated glib2.0 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Wed, 18 Jan 2012 13:50:56 +0100
Source: glib2.0
Binary: libglib2.0-0 libglib2.0-udeb libglib2.0-bin libglib2.0-dev 
libglib2.0-0-dbg libglib2.0-data libglib2.0-doc libgio-fam libglib2.0-0-refdbg
Architecture: source all amd64
Version: 2.30.2-5
Distribution: unstable
Urgency: low
Maintainer: Debian GNOME Maintainers 
<[email protected]>
Changed-By: Michael Biebl <[email protected]>
Description: 
 libgio-fam - GLib Input, Output and Streaming Library (fam module)
 libglib2.0-0 - GLib library of C routines
 libglib2.0-0-dbg - Debugging symbols for the GLib libraries
 libglib2.0-0-refdbg - GLib library of C routines - refdbg library
 libglib2.0-bin - Programs for the GLib library
 libglib2.0-data - Common files for GLib library
 libglib2.0-dev - Development files for the GLib library
 libglib2.0-doc - Documentation files for the GLib library
 libglib2.0-udeb - GLib library of C routines - minimal runtime (udeb)
Closes: 653308
Changes: 
 glib2.0 (2.30.2-5) unstable; urgency=low
 .
   [ Josselin Mouette ]
   * Drop deprecated build-dependencies on pygobject & python-dbus.
   * Retain one on python for the script that uses it.
 .
   [ Loïc Minier ]
   * Avoid harmless warnings when processing triggers of libglib2.0-0
     ("Unable to open directory /usr/lib/gio/modules: Error opening
     directory '/usr/lib/gio/modules': No such file or directory").
 .
   [ Michael Biebl ]
   * Cherry-pick patches from upstream Git which fix handling of ENUMs and
     integral return types on 64-bit BE platforms. Closes: #653308
     - Add d/p/94-closure-fix-handling-of-ENUMs-and-integral-return-ty.patch.
     - Add d/p/93-gvalue-Add-explicitly-signed-g_value_get_schar-and-g.patch.
     - Update symbols file accordingly.
Checksums-Sha1: 
 402c300dbbecadae16672a45170b8ae306018058 2828 glib2.0_2.30.2-5.dsc
 e90ab8aded25d5c98e9e8ae58a3b19cd76c79c4d 58701 glib2.0_2.30.2-5.debian.tar.gz
 5d2ff081e8663ea5975ddbbebf53d964439dadd4 2318558 
libglib2.0-data_2.30.2-5_all.deb
 0a2c9cd1133d29dd2d988ede76097afad37827d2 2384186 
libglib2.0-doc_2.30.2-5_all.deb
 db2b4395d3096c99440db65b6c0fb40eb0d84090 1846012 
libglib2.0-0_2.30.2-5_amd64.deb
 05237ea0556140a316ed1a7ebe161b275c9180f3 2768714 
libglib2.0-udeb_2.30.2-5_amd64.udeb
 e25bc08eaa3c53dd615fd9c4a036aaf0fcb5286b 639548 
libglib2.0-bin_2.30.2-5_amd64.deb
 9890943875545dbaf799c052df0a67a90ab4acb3 2382934 
libglib2.0-dev_2.30.2-5_amd64.deb
 d2a90d3b122f9421f831cdef77b68ea314ac3375 3009820 
libglib2.0-0-dbg_2.30.2-5_amd64.deb
 b72aa8a41e2989d715d9555f44b9c2a43d869899 1049692 
libglib2.0-0-refdbg_2.30.2-5_amd64.deb
Checksums-Sha256: 
 cf877302965a8cae15ccf3235c537b074e40435f69343a7e93235d4286267656 2828 
glib2.0_2.30.2-5.dsc
 5397590d15583b94fb238e572024839fa24b1f2aa9994e141c24dd7720ce90d8 58701 
glib2.0_2.30.2-5.debian.tar.gz
 6e66db993299944ec6e4918e32a2978341f0dc59dd7640301e44d5dd86636760 2318558 
libglib2.0-data_2.30.2-5_all.deb
 5dae715c7ec76d14af71507110a58df5b0eeb68cd9d693b50f36c852df38944b 2384186 
libglib2.0-doc_2.30.2-5_all.deb
 ab7829b31a7513c1d9ad3d8e1c225bcdde203570092f831d19f84ff1d08e95ff 1846012 
libglib2.0-0_2.30.2-5_amd64.deb
 5a21db552ebeb0ad320738e2ad21f0a8dfe2a1bbe8e696be181f25013a76d0a7 2768714 
libglib2.0-udeb_2.30.2-5_amd64.udeb
 eefa76a9629e27fda9bdd65db34067f182e955ffc47914209b63c3002fb9ae28 639548 
libglib2.0-bin_2.30.2-5_amd64.deb
 fec8764c43cd18a5cce9b3af2ca4aa9aeac8e22b22032e0622de6e524c61b801 2382934 
libglib2.0-dev_2.30.2-5_amd64.deb
 2b474b4b2e17f4bc9142f7e8e1cbe43e79b3d40940d4cac2145cef0073c78f35 3009820 
libglib2.0-0-dbg_2.30.2-5_amd64.deb
 e120935530fdaf6ef7f9c9d675e75a662df70f25d93c6a7ce351805ea957bd7f 1049692 
libglib2.0-0-refdbg_2.30.2-5_amd64.deb
Files: 
 a82b1560e6b0b6ff38cbf816bbb9b579 2828 libs optional glib2.0_2.30.2-5.dsc
 d0e447fb60fbf1671140467aaeb5644c 58701 libs optional 
glib2.0_2.30.2-5.debian.tar.gz
 0e54331fcbb597361353e2d25047787f 2318558 libs optional 
libglib2.0-data_2.30.2-5_all.deb
 2a857d959b413f2d94065137833f094b 2384186 doc optional 
libglib2.0-doc_2.30.2-5_all.deb
 6c910975b62444a443e06823a9ccdec4 1846012 libs optional 
libglib2.0-0_2.30.2-5_amd64.deb
 897ae65809d75f5a847f7dc00e8db404 2768714 debian-installer optional 
libglib2.0-udeb_2.30.2-5_amd64.udeb
 89e6275c89562a3e1c2e173a65915ccb 639548 misc optional 
libglib2.0-bin_2.30.2-5_amd64.deb
 b2feca67d707b73a28d3cf7409ec22b8 2382934 libdevel optional 
libglib2.0-dev_2.30.2-5_amd64.deb
 105a79066e7624b4897971bf572d90fe 3009820 debug extra 
libglib2.0-0-dbg_2.30.2-5_amd64.deb
 e764a693cda5603470a2ba1652ada67e 1049692 debug extra 
libglib2.0-0-refdbg_2.30.2-5_amd64.deb
Package-Type: udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBCAAGBQJPFsh+AAoJEGrh3w1gjyLcm5cP/AxyB37T9nTjvrhd0Jc0zFKG
9yvGHAkZxsQQRPkZxSOOyrGB6h+rgYPGs352q0fOW1+Sip9cuzFVVP0msTWbMA3g
wLdjdolX3fr8zdDMHAVeLyFiwfF9C3KmiDrZ/2DIfrOKO8y6C0ymHQpG4z55uu5I
HSOZIqFcTFAWs1qg8k72nxubgnK2jBo6B89H+GU+jdAsuTk98FsvnL2szRqSI2E/
huHueKBH1Kvt5DJgyy13sZuMY5hqCEGrUePbsOPRUApGAXOxObC+JDz4c2Nwsk2J
pf3Bv8V/olW/H6bT95TxyCXVRhlT8ZiaiLQPcrMopdv1ADD5OfWyEZ2VeECl7Oyg
0hMIkGjBnoDBpA1n9CQRYrazWcC87Is1EGmP9dFTCAV7pkeoYqXi+bX0S4v5NfoD
g1IgXAzH0UE2WW+vMlK4LRrYhvuKtPqjM2RLb2gNA1dJyzDa/ZYtJmLAXdVHequq
QhkNfqWAU6QizEiduJjvUqb72CiJpj9HKCd9rE3z901DKGrrgW7fj2MSqg7bGWhU
rEuX5Yl89sv3X9EXlPft/i6a0/j84yv5noaW0HLKotsxuVEudgvNL1Yd94U+qUqf
CtZXUSD/idBn2W7e8wM5MtFstsnWpTJZKUHjWPgodZ4Y8m2SXQBpCphyw8jbzWJC
u/EtHDCiWSl9aWgMb6xO
=62lB
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to