classification
Title: unaligned memory access in the _sha3 extension
Type: crash Stage:
Components: Extension Modules Versions: Python 3.8, Python 3.7, Python 3.6
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: christian.heimes, doko
Priority: high Keywords: patch

Created on 2019-04-03 05:41 by doko, last changed 2019-04-03 05:41 by doko.

Files
File name Uploaded Description Edit
arm-alignment.diff doko, 2019-04-03 05:41 patch
Messages (1)
msg339379 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2019-04-03 05:41
This was seen when running an armhf binary on a 64bit kernel. The problem is that the implementation uses unaligned memory accesses, and even is well aware of that. The module allows misaligned memory accesses by default. The NO_MISALIGNED_ACCESSES macro is never defined.  Now you can define it only on architectures where unaligned memory accesses are not allowed (ARM32 on 64bit kernels), or where there are performance penalties (AArch64), or just don't try to outsmart modern compilers and always define this macro.

The attached patch only fixes the issue on ARM32 and AArch64, however the safe fix should be to always define the macro.
History
Date User Action Args
2019-04-03 07:14:44dokolinkissue36445 superseder
2019-04-03 05:41:19dokocreate