bpo-28055: fix unaligned accesses in siphash24() by DerDakon · Pull Request #6123 · python/cpython
serhiy-storchaka
changed the title
fix unaligned accesses in siphash24()
bpo-28055: fix unaligned accesses in siphash24()
The hash implementation casts the input pointer to uint64_t* and directly reads from this, which may cause unaligned accesses. Use memcpy() instead so this code will not crash with SIGBUS on sparc. https://bugs.gentoo.org/show_bug.cgi?id=636400
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request
May 13, 2018The hash implementation casts the input pointer to uint64_t* and directly reads from this, which may cause unaligned accesses. Use memcpy() instead so this code will not crash with SIGBUS on sparc. https://bugs.gentoo.org/show_bug.cgi?id=636400 (cherry picked from commit 1e2ec8a) Co-authored-by: Rolf Eike Beer <eike@sf-mail.de>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request
May 13, 2018The hash implementation casts the input pointer to uint64_t* and directly reads from this, which may cause unaligned accesses. Use memcpy() instead so this code will not crash with SIGBUS on sparc. https://bugs.gentoo.org/show_bug.cgi?id=636400 (cherry picked from commit 1e2ec8a) Co-authored-by: Rolf Eike Beer <eike@sf-mail.de>
miss-islington added a commit that referenced this pull request
May 13, 2018The hash implementation casts the input pointer to uint64_t* and directly reads from this, which may cause unaligned accesses. Use memcpy() instead so this code will not crash with SIGBUS on sparc. https://bugs.gentoo.org/show_bug.cgi?id=636400 (cherry picked from commit 1e2ec8a) Co-authored-by: Rolf Eike Beer <eike@sf-mail.de>
miss-islington added a commit that referenced this pull request
May 13, 2018The hash implementation casts the input pointer to uint64_t* and directly reads from this, which may cause unaligned accesses. Use memcpy() instead so this code will not crash with SIGBUS on sparc. https://bugs.gentoo.org/show_bug.cgi?id=636400 (cherry picked from commit 1e2ec8a) Co-authored-by: Rolf Eike Beer <eike@sf-mail.de>
matoro added a commit to matoro/cpython that referenced this pull request
Jun 22, 2022Like python#6123 this pointer may be unaligned, so a memcpy() instead of simple assignment is required for strict architectures e.g. sparc.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters