Skip to content

bpo-32260: don't byte swap siphash keys#4771

Merged
benjaminp merged 1 commit into
masterfrom
benjamin-no-swap
Dec 9, 2017
Merged

bpo-32260: don't byte swap siphash keys#4771
benjaminp merged 1 commit into
masterfrom
benjamin-no-swap

Conversation

@benjaminp

@benjaminp benjaminp commented Dec 9, 2017

Copy link
Copy Markdown
Contributor

Reference siphash takes the keys as a bytes, so it makes sense to byte swap
when reifying the keys as 64-bit integers. However, Python's siphash takes host
integers in to start with.

https://bugs.python.org/issue32260

Reference siphash takes the keys as a bytes, so it makes sense to byte swap
when reifying the keys as 64-bit integers. However, Python's siphash takes host
integers in to start with.
@benjaminp

Copy link
Copy Markdown
Contributor Author

@tiran, I'm going merge this because I hope it will fix the big endian buildboxes.

@benjaminp benjaminp merged commit 4e3e156 into master Dec 9, 2017
@benjaminp benjaminp deleted the benjamin-no-swap branch December 9, 2017 19:24
@tiran

tiran commented Dec 9, 2017

Copy link
Copy Markdown
Member

@benjaminp Was it a success?

@benjaminp

Copy link
Copy Markdown
Contributor Author

Almost. The core hash algorithm is now consistent across endianness but since we need to byte swap PYTHONHASHSEED for true consistency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants