| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There are two issues at play here: 1. Python version of `map_hash` unnecessarily performs hash truncation even if the hash is already 32-bit wide, which potentially converts it from signed int to unsigned long. 2. The `test_none_collisions` test generates a collision node with hash greater than 2^32. Both of these are problematic on 32-bit systems, where `sizeof(Py_hash_t)` is 4, and so anything that doesn't fit into `Py_hash_t` gets bit-mangled, breaking the `hash(x) != x` invariance that the test relies upon. Fixes: #53 Fixes: #50
https://build.opensuse.org/request/show/910245 by user mcepl + dimstar_suse - Upstream fixed problems with 32bit systems (gh#MagicStack/immutables#69) so we have removed skip_32bit_tests.patch and added new solution which actually fixes the issue: test_none_collisions-32-bit.patch.
Updates ======= * Refactor typings (by @bryanforbes in 39f9f0d and @msullivan in 4a17549) * Update Python 3.10 support, drop Python 3.5 (by @elprans in fa35523 and 189b959) Fixes ===== * Fix test_none_collisions on 32-bit systems (#69) (by @elprans in fa35523 for #69) Misc ==== * Clarify the license of the included pythoncapi_compat.h header (by @elprans in 67c5edf for #64) * Use cibuildwheel to build wheels (#70) (by @elprans in f671cb4 for #70)
| Back | FazBrowse Home | New Git URL |
There are two issues at play here:
Python version of map_hash unnecessarily performs hash truncation
even if the hash is already 32-bit wide, which potentially converts
it from signed int to unsigned long.
The test_none_collisions test generates a collision node with
hash greater than 2^32.
Both of these are problematic on 32-bit systems, where sizeof(Py_hash_t)
is 4, and so anything that doesn't fit into Py_hash_t gets bit-mangled,
breaking the hash(x) != x invariance that the test relies upon.
Fixes: #53
Fixes: #50