This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author malin
Recipients docs@python, gregory.p.smith, malin
Date 2022-03-17.07:01:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1647500468.5.0.844982934909.issue47040@roundup.psfhosted.org>
In-reply-to
Content
`binascii.crc32` doc also has this invalid document:
doc: https://docs.python.org/3/library/binascii.html#binascii.crc32
3.0.0 code: https://github.com/python/cpython/blob/v3.0/Modules/binascii.c#L1035

In addition, `binascii.crc32` has an `USE_ZLIB_CRC32` code path, but it's buggy.
The length of zlib `crc32()` function is `unsigned int`, so if use `USE_ZLIB_CRC32` code path and the data > 4GiB, the result is wrong.
Should we remove `USE_ZLIB_CRC32` code path in `binascii.c`, or fix it?

`USE_ZLIB_CRC32` code path in binascii.c (bug code): 
https://github.com/python/cpython/blob/v3.11.0a6/Modules/binascii.c#L756-L767
crc32 in zlibmodule.c, it uses an UINT_MAX sliding window (right code):
 https://github.com/python/cpython/blob/v3.11.0a6/Modules/zlibmodule.c#L1436
History
Date User Action Args
2022-03-17 07:01:08malinsetrecipients: + malin, gregory.p.smith, docs@python
2022-03-17 07:01:08malinsetmessageid: <1647500468.5.0.844982934909.issue47040@roundup.psfhosted.org>
2022-03-17 07:01:08malinlinkissue47040 messages
2022-03-17 07:01:08malincreate