New issue 3088: lzma: pypy3: 7.1.1-beta0 is not honest for max_length
https://bitbucket.org/pypy/pypy/issues/3088/lzma-pypy3-711-beta0-is-not-honest-for
Hiroshi Miura:
lzma.decompres\(\) is not honest for max\_length argument in pypy3 7.1.1-beta0
Here is a test script to reproduce a problem
```python
#! /usr/bin/env pypy3
import lzma
def test_lzma_no_honest_max_length():
filters=[{'id': 4611686018427387905, 'lc': 3, 'lp': 0, 'pb': 2,
'dict_size': 65536}]
startpos = 32
read_size = 15971
max_length = 26948
out_len = 57703
decompressor = lzma.LZMADecompressor(format=lzma.FORMAT_RAW,
filters=filters)
with open('bugzilla_4.7z', 'rb') as f:
f.seek(startpos)
indata = f.read(read_size)
outdata = decompressor.decompress(indata, max_length)
assert len(outdata) <= max_length # FIXME
```
Test data is attached.
_______________________________________________
pypy-issue mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-issue