mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
[3.9] bpo-36515: Disable unaligned memory access in _sha3 on ARM (GH-25927) (GH-25928)
Contributed-By: Matthias Klose
Automerge-Triggered-By: GH:tiran
(cherry picked from commit da5c808fb5
)
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
This commit is contained in:
parent
ea93270366
commit
ce47addfb6
2 changed files with 7 additions and 0 deletions
|
@ -0,0 +1,2 @@
|
|||
The :mod:`hashlib` module no longer does unaligned memory accesses when
|
||||
compiled for ARM platforms.
|
|
@ -64,6 +64,11 @@
|
|||
#define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN
|
||||
#endif
|
||||
|
||||
/* Prevent bus errors on platforms requiring aligned accesses such ARM. */
|
||||
#if HAVE_ALIGNED_REQUIRED && !defined(NO_MISALIGNED_ACCESSES)
|
||||
#define NO_MISALIGNED_ACCESSES
|
||||
#endif
|
||||
|
||||
/* mangle names */
|
||||
#define KeccakF1600_FastLoop_Absorb _PySHA3_KeccakF1600_FastLoop_Absorb
|
||||
#define Keccak_HashFinal _PySHA3_Keccak_HashFinal
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue