summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2022-03-20 19:28:15 (GMT)
committerGitHub <noreply@github.com>2022-03-20 19:28:15 (GMT)
commit9d1c4d69dbc800ac344565119337fcf490cdc800 (patch)
treef27ebdb3ae2bfa27853b42def2df6f29625ac5df /Python
parent3ae975f1ac880c47d51cca6c9e305547bd365be7 (diff)
downloadcpython-9d1c4d69dbc800ac344565119337fcf490cdc800.zip
cpython-9d1c4d69dbc800ac344565119337fcf490cdc800.tar.gz
cpython-9d1c4d69dbc800ac344565119337fcf490cdc800.tar.bz2
bpo-38256: Fix binascii.crc32() when inputs are 4+GiB (GH-32000)
When compiled with `USE_ZLIB_CRC32` defined (`configure` sets this on POSIX systems), `binascii.crc32(...)` failed to compute the correct value when the input data was >= 4GiB. Because the zlib crc32 API is limited to a 32-bit length. This lines it up with the `zlib.crc32(...)` implementation that doesn't have that flaw. **Performance:** This also adopts the same GIL releasing for larger inputs logic that `zlib.crc32` has, and causes the Windows build to always use zlib's crc32 instead of our slow C code as zlib is a required build dependency on Windows.
Diffstat (limited to 'Python')
0 files changed, 0 insertions, 0 deletions