summaryrefslogtreecommitdiff
path: root/dev-lang/python/files/python-3.6.5-hash-unaligned.patch
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2019-12-19 09:58:55 +0100
committerMichał Górny <mgorny@gentoo.org>2019-12-19 09:58:55 +0100
commit7fff5d2e3783ee64a006c97ef20b119c19a2bb65 (patch)
treed7f77d51daa0b9e0ce4912a54441a0e4c44e6b63 /dev-lang/python/files/python-3.6.5-hash-unaligned.patch
parent10f715f736761a98bb95b40a7e549190c4376d81 (diff)
downloadgentoo-7fff5d2e3783ee64a006c97ef20b119c19a2bb65.tar.gz
gentoo-7fff5d2e3783ee64a006c97ef20b119c19a2bb65.tar.bz2
gentoo-7fff5d2e3783ee64a006c97ef20b119c19a2bb65.zip
dev-lang/python: Remove redundant versions
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-lang/python/files/python-3.6.5-hash-unaligned.patch')
-rw-r--r--dev-lang/python/files/python-3.6.5-hash-unaligned.patch42
1 files changed, 0 insertions, 42 deletions
diff --git a/dev-lang/python/files/python-3.6.5-hash-unaligned.patch b/dev-lang/python/files/python-3.6.5-hash-unaligned.patch
deleted file mode 100644
index d096887cbfb7..000000000000
--- a/dev-lang/python/files/python-3.6.5-hash-unaligned.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-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.
-
---- a/Python/pyhash.c 2017-11-29 10:21:20.283094068 +0100
-+++ b/Python/pyhash.c 2017-11-29 10:24:26.733087813 +0100
-@@ -369,7 +369,7 @@
- uint64_t k0 = _le64toh(_Py_HashSecret.siphash.k0);
- uint64_t k1 = _le64toh(_Py_HashSecret.siphash.k1);
- uint64_t b = (uint64_t)src_sz << 56;
-- const uint64_t *in = (uint64_t*)src;
-+ const uint8_t *in = (uint8_t*)src;
-
- uint64_t v0 = k0 ^ 0x736f6d6570736575ULL;
- uint64_t v1 = k1 ^ 0x646f72616e646f6dULL;
-@@ -378,11 +378,13 @@
-
- uint64_t t;
- uint8_t *pt;
-- uint8_t *m;
-+ const uint8_t *m;
-
- while (src_sz >= 8) {
-- uint64_t mi = _le64toh(*in);
-- in += 1;
-- src_sz -= 8;
-+ uint64_t mi;
-+ memcpy(&mi, in, sizeof(mi));
-+ mi = _le64toh(mi);
-+ in += sizeof(mi);
-+ src_sz -= sizeof(mi);
- v3 ^= mi;
- DOUBLE_ROUND(v0,v1,v2,v3);
-@@ -391,7 +393,7 @@
-
- t = 0;
- pt = (uint8_t *)&t;
-- m = (uint8_t *)in;
-+ m = in;
- switch (src_sz) {
- case 7: pt[6] = m[6]; /* fall through */
- case 6: pt[5] = m[5]; /* fall through */