[pypy-issue] Issue #2756: hashlib functions segfault when passed a BytesIO buffer (pypy/pypy)

Andrew Brown issues-reply at bitbucket.org
Wed Feb 21 21:00:01 EST 2018


New issue 2756: hashlib functions segfault when passed a BytesIO buffer
https://bitbucket.org/pypy/pypy/issues/2756/hashlib-functions-segfault-when-passed-a

Andrew Brown:

If you pass a BytesIO buffer to the hashlib.* functions, this causes PyPy to segfault.
I'm running this on Linux using Python 3 on PyPy 5.10.1

```
Python 3.5.3 (3f6eaa010fce, Jan 11 2018, 04:44:35)
[PyPy 5.10.1 with GCC 6.2.0 20160901] on linux
```

Code to reproduce:
```
import io
import hashlib

a = io.BytesIO(b"Hello, world!")
buf = a.getbuffer()

h = hashlib.sha256(buf)

```

I've also reproduced this with `--jit off` but I haven't yet tried with a debug build or anything else; I'm not very experienced with debugging PyPy.




More information about the pypy-issue mailing list