[issue38256] binascii.crc32 is not 64-bit clean when USE_ZLIB_CRC32

2022-03-21 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

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.

--
resolution:  -> fixed
stage: patch review -> commit review
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38256] binascii.crc32 is not 64-bit clean when USE_ZLIB_CRC32

2022-03-21 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset 58a7e130375776b192a99b013bc563205a639edc by Gregory P. Smith in 
branch '3.9':
bpo-38256: Fix binascii.crc32 large input. (GH-32000) (GH-32013) (GH-32015)
https://github.com/python/cpython/commit/58a7e130375776b192a99b013bc563205a639edc


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38256] binascii.crc32 is not 64-bit clean when USE_ZLIB_CRC32

2022-03-20 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
pull_requests: +30103
pull_request: https://github.com/python/cpython/pull/32015

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38256] binascii.crc32 is not 64-bit clean when USE_ZLIB_CRC32

2022-03-20 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset 4c989e19c84ec224655bbbde9422e16d4a838a80 by Gregory P. Smith in 
branch '3.10':
[3.10] bpo-38256: Fix binascii.crc32 large input. (GH-32000) (GH-32013)
https://github.com/python/cpython/commit/4c989e19c84ec224655bbbde9422e16d4a838a80


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38256] binascii.crc32 is not 64-bit clean when USE_ZLIB_CRC32

2022-03-20 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
pull_requests: +30101
pull_request: https://github.com/python/cpython/pull/32013

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38256] binascii.crc32 is not 64-bit clean when USE_ZLIB_CRC32

2022-03-20 Thread Gregory P. Smith


Gregory P. Smith  added the comment:


New changeset 9d1c4d69dbc800ac344565119337fcf490cdc800 by Gregory P. Smith in 
branch 'main':
bpo-38256: Fix binascii.crc32() when inputs are 4+GiB (GH-32000)
https://github.com/python/cpython/commit/9d1c4d69dbc800ac344565119337fcf490cdc800


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38256] binascii.crc32 is not 64-bit clean when USE_ZLIB_CRC32

2022-03-19 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
assignee:  -> gregory.p.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38256] binascii.crc32 is not 64-bit clean when USE_ZLIB_CRC32

2022-03-19 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
keywords: +patch
pull_requests: +30089
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/32000

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38256] binascii.crc32 is not 64-bit clean when USE_ZLIB_CRC32

2022-03-19 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

it depends on the build.  USE_ZLIB_CRC32 causes it due to zlib's 32-bitness as 
noted my marko.

$ ./python 
Python 3.11.0a6+ (heads/main-dirty:b3f2d4c8ba, Mar 19 2022, 15:32:04) [GCC 
9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import binascii, zlib
>>> bigdata=memoryview(bytearray((1<<32) + 100))
>>> 
>>> print(binascii.crc32(bigdata))
2575877834
>>> crc = binascii.crc32(bigdata[:1000])
>>> crc = binascii.crc32(bigdata[1000:], crc)
>>> print(crc)
2838121701
>>> 
>>> print(zlib.crc32(bigdata))
2838121701
>>> crc = zlib.crc32(bigdata[:1000])
>>> crc = zlib.crc32(bigdata[1000:], crc)
>>> print(crc)
2838121701
>>>

--
resolution: works for me -> 
stage: resolved -> needs patch
status: closed -> open
title: binascii.crc32 is not 64-bit clean -> binascii.crc32 is not 64-bit clean 
when USE_ZLIB_CRC32
versions: +Python 3.10, Python 3.11, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com