Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pypy seg fault on larger byte arrays #36

Open
johnistan opened this issue Mar 21, 2016 · 4 comments
Open

pypy seg fault on larger byte arrays #36

johnistan opened this issue Mar 21, 2016 · 4 comments

Comments

@johnistan
Copy link

This came up in a pykafka compression issue.

Parsely/pykafka#508

So byte arrays above a certain size causes a seg fault.

(pypy) ➜ cat s.py
from uuid import uuid4
import snappy

payload = b''.join([uuid4().bytes for i in range(10)])

c = snappy.compress(payload)
assert snappy.decompress(c) == payload
(pypy) ➜  python s.py
[1]    4587 segmentation fault (core dumped)  python s.py
(pypy) ➜  python
Python 2.7.10 (bbd45126bc69, Mar 18 2016, 21:35:08)
[PyPy 5.0.1 with GCC 4.8.4] on linux2

while

from uuid import uuid4
import snappy

payload = b''.join([uuid4().bytes for i in range(5)])

c = snappy.compress(payload)
assert snappy.decompress(c) == payload

passes

@qinxuye
Copy link

qinxuye commented Jun 16, 2016

Also encounter a seg fault, any solution yet?

@johnistan
Copy link
Author

This lib looks more targeted for pypy

https://pypi.python.org/pypi/ctypes-snappy

On Wed, Jun 15, 2016, 6:52 PM Qin Xuye [email protected] wrote:

Also encounter a seg fault, any solution yet?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#36 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAw3nV8ITJMAZmmCLkdHQlnqC3iC_6hHks5qMKx7gaJpZM4H1ne5
.

@daa
Copy link
Contributor

daa commented May 18, 2018

Just checked with PyPy-6.0.0, python-snappy-0.5.2, libsnappy-1.0.4 and libsnappy-1.1.7 and segfault was not reproduced.

@martindurant
Copy link
Member

@johnistan , @chineking still an issue for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants