[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#633458: gcc-4.6 miscompiles libgcrypt11 on armel



On 2011-07-14 Matthias Klose <doko@debian.org> wrote:
> On 07/14/2011 08:17 PM, Andreas Metzler wrote:
> > (sid)ametzler@abel:~/GNUTLS/GCR/libgcrypt11-1.4.6$ ~/GNUTLS/2.10.5-2/usr/bin/gnutls-cli db.debian.org
> > Resolving 'db.debian.org'...
> > Connecting to '82.195.75.106:443'...
> > *** Fatal error: Decryption has failed.
> > *** Handshake has failed
> > GnuTLS error: Decryption has failed.
> > -------------------------------
> > 
> > ~/GNUTLS/2.10.5-2/ is not a local build, I just extracted (dpkg -x) the
> > official deb since abel does not have gnutls-bin installed.

> strange. this does work for me on a local machine (Ubuntu 11.04 kernel, armv7
> processor, Genesi Efika MX), sid chroot

I have no idea why that is the case. It is 100% reproducible on abel.

Anyway, I have just uploaded libgcrypt11 1.4.6-8 including the
attached workaround.

cu andreas
-- 
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'
Description: Disable inlining on do_decrypt_aligned() on ARM. This works
 around gcc issue #633458, which had broken gnutls on ARM.
Author: Andreas Metzler <ametzler@debian.org>
Bug-Debian: http://bugs.debian.org/633458

--- libgcrypt11-1.4.6.orig/cipher/rijndael.c
+++ libgcrypt11-1.4.6/cipher/rijndael.c
@@ -569,6 +569,9 @@ _gcry_aes_cbc_enc (void *context, unsign
 /* Decrypt one block.  A and B need to be aligned on a 4 byte boundary
    and the decryption must have been prepared.  A and B may be the
    same. */
+#ifdef ARMWORKAROUND633458
+__attribute__((noinline))
+#endif
 static void
 do_decrypt_aligned (RIJNDAEL_context *ctx, 
                     unsigned char *b, const unsigned char *a)

Reply to: