You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
binascii.crc32 is not 64-bit clean when USE_ZLIB_CRC32 #82437
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee='https://github.com/gpshead'closed_at=<Date2022-03-21.06:37:04.336>created_at=<Date2019-09-23.07:48:20.996>labels= ['type-bug', '3.8', '3.9', '3.10', '3.11', '3.7', 'library']
title='binascii.crc32 is not 64-bit clean when USE_ZLIB_CRC32'updated_at=<Date2022-03-21.06:37:04.335>user='https://bugs.python.org/zmk'
I've got
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)]
2838121701
2838121701
2838121701
2838121701
zmk commented on Sep 23, 2019
zmkmannequin
MannequinAuthor
More actions
Looking at the code, the bug is dependant on USE_ZLIB_CRC32 define and it's unfixed in master. Cause is zlib crc32 that takes length as integer, zlibmodule has workaround, binascii has not.
Activity
zmk commentedon Sep 23, 2019
Following code:
----------------------------
Outputs with python3.7
Savier commentedon Sep 23, 2019
I've got
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)]
2838121701
2838121701
2838121701
2838121701
zmk commentedon Sep 23, 2019
Looking at the code, the bug is dependant on USE_ZLIB_CRC32 define and it's unfixed in master. Cause is zlib crc32 that takes length as integer, zlibmodule has workaround, binascii has not.
zmk commentedon Sep 23, 2019
Found zlibmodule fix: https://bugs.python.org/issue10276
gpshead commentedon Mar 19, 2022
gpshead commentedon Mar 19, 2022
it depends on the build. USE_ZLIB_CRC32 causes it due to zlib's 32-bitness as noted my marko.
[-]binascii.crc32 is not 64-bit clean[/-][+]binascii.crc32 is not 64-bit clean when USE_ZLIB_CRC32[/+]gpshead commentedon Mar 20, 2022
New changeset 9d1c4d6 by Gregory P. Smith in branch 'main':
bpo-38256: Fix binascii.crc32() when inputs are 4+GiB (GH-32000)
9d1c4d6
gpshead commentedon Mar 20, 2022
New changeset 4c989e1 by Gregory P. Smith in branch '3.10':
[3.10] bpo-38256: Fix binascii.crc32 large input. (GH-32000) (GH-32013)
4c989e1
gpshead commentedon Mar 21, 2022
New changeset 58a7e13 by Gregory P. Smith in branch '3.9':
bpo-38256: Fix binascii.crc32 large input. (GH-32000) (GH-32013) (GH-32015)
58a7e13
gpshead commentedon Mar 21, 2022
3.8 and older are in security fix only mode. 3.9+ have been fixed. realistically this was a rare issue with multiple workarounds.
The 3.9 and 3.10 fixes were strictly bugfix only. The 3.11 fix included some performance improvements.