pypy seg fault on larger byte arrays
- Ngôn ngữ chính
- Python
- Star
- 490
- Fork
- 104
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- backend
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100