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

Bug#633458: gcc-4.6 miscompiles libgcrypt11 on armel



On 2011-07-10 Andreas Metzler <ametzler@downhill.at.eu.org> wrote:
> On 2011-07-10 Andreas Metzler <ametzler@downhill.at.eu.org> wrote:
> > On 2011-07-10 Andreas Metzler <ametzler@downhill.at.eu.org> wrote:
> > > Package: gcc-4.6
> > > Version: 4.6.1-1
> > > Severity: normal
> > > Blocks: 633373

> > > gcc-4.6 seems to miscompile libgcrypt11 on armel, causing total
> > > failure of gnutls26.

> > > -------------------------------
> > > (sid)ametzler@abel:~/GNUTLS$ ~/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.
> > > -------------------------------
> > [...]

> > Building with -fno-strict-aliasing does not help.
> [...]

> The culprit is cipher/rijndael.c. If I build this file with
> gcc-4.5 the bug goes away.

Hello,

I do not know how to go on now.

What I tried was splitting rijndael.c into multiple separate files.
However this made the error go away.

It seems that the significant change I made when spliting was
dropping the static qualifier on the function declarations.

The minimal change I found to make my testcase (gnutls-cli
db.debian.org) go away was dropping the static qualifier from these
two functions:

------------------------
/* 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. */
static void
do_decrypt_aligned (RIJNDAEL_context *ctx, 
                    unsigned char *b, const unsigned char *a)


/* Decrypt one block.  AX and BX may be the same. */
static void
do_decrypt (RIJNDAEL_context *ctx, byte *bx, const byte *ax)
------------------------

cu andreas



Reply to: