w32: Fix alignment problem with AESNI on Windows >= 8
authorWerner Koch <wk@gnupg.org>
Fri, 4 Sep 2015 10:32:16 +0000 (12:32 +0200)
committerWerner Koch <wk@gnupg.org>
Fri, 4 Sep 2015 10:32:16 +0000 (12:32 +0200)
commite2785a2268702312529521df3bd2f4e6b43cea3a
treee2e2be008b8d38c8122141fb574b78c3ebfcdeb2
parentc17f84bd02d7ee93845e92e20f6ddba814961588
w32: Fix alignment problem with AESNI on Windows >= 8

* cipher/cipher-selftest.c (_gcry_cipher_selftest_alloc_ctx): New.
* cipher/rijndael.c (selftest_basic_128, selftest_basic_192)
(selftest_basic_256): Allocate context on the heap.
--

The stack alignment on Windows changed and because ld seems to limit
stack variables to a 8 byte alignment (we request 16), we get bus
errors from the selftests if AESNI is in use.

GnuPG-bug-id: 2085
Signed-off-by: Werner Koch <wk@gnupg.org>
cipher/cipher-selftest.c
cipher/cipher-selftest.h
cipher/rijndael.c