Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

pypy seg fault on larger byte arrays

Open
#36 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
backend

Research direction

Start by running the s.py reproduction from the issue with five and ten UUID byte arrays under PyPy 5.0.1, and compare the compression and decompression assertions. Then trace the python-snappy binding involved in those calls and use the pykafka issue for context. Done means larger byte arrays complete without a segmentation fault and the assertions still pass.

Written by the indexing model from the issue text.

Description

This came up in a pykafka compression issue.

https://github.com/Parsely/pykafka/issues/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

Dominant language
Python
Stars
490
Forks
104
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from intake/python-snappy

All issues in intake/python-snappy

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.