[New-bugs-announce] [issue38256] binascii.crc32 is not 64-bit clean
marko kreen
report at bugs.python.org
Mon Sep 23 03:48:21 EDT 2019
New submission from marko kreen <markokr at gmail.com>:
Following code:
----------------------------
import binascii, zlib
bigdata=memoryview(bytearray((1<<32) + 100))
print(binascii.crc32(bigdata))
crc = binascii.crc32(bigdata[:1000])
crc = binascii.crc32(bigdata[1000:], crc)
print(crc)
print(zlib.crc32(bigdata))
crc = zlib.crc32(bigdata[:1000])
crc = zlib.crc32(bigdata[1000:], crc)
print(crc)
---------------------------
Outputs with python3.7
$ python3.7 x.py
2575877834
2838121701
2838121701
2838121701
----------
components: Library (Lib)
messages: 352992
nosy: zmk
priority: normal
severity: normal
status: open
title: binascii.crc32 is not 64-bit clean
type: behavior
versions: Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38256>
_______________________________________
More information about the New-bugs-announce
mailing list