[pypy-issue] Issue #2290: segfault in pypy 2.2.1 (pypy/pypy)

FredStober issues-reply at bitbucket.org
Tue May 3 10:42:20 EDT 2016


New issue 2290: segfault in pypy 2.2.1
https://bitbucket.org/pypy/pypy/issues/2290/segfault-in-pypy-221

FredStober:

Hi,

I have another code that *sometimes* crashes with a segfault. I've reduced the problem to a small test program. It crashes reliably with my pypy 2.2.1 that is bundled with Ubuntu 14.04.4 LTS (Python 2.7.3 (2.2.1+dfsg-1ubuntu0.3, Sep 30 2015, 15:18:40); [PyPy 2.2.1 with GCC 4.8.4] on linux2):

```
#!python
class Wrapper(object):
        pass

while True:
        lines = []
        for i in range(100000): # larger numbers => larger crash probability (originally read from a file)
                lines.append('a=a')
        for line in lines:
                map(str.strip, line.split('=', 1))

        tmp = {'1': None, '2': None, '3': None, '4': None, '5': None, '6': None, Wrapper(): None}
        for jobNum in range(2): # len = 16!
                map(tmp.get, tmp.keys())

```

I've been unable to reproduce the problem with PyPy 5.2.0-alpha0 (Apr 22 2016, 22:07:05) [357a144f9ea1]. However the code seems to be very sensitive to the memory layout (after changing to range(15), the problem disappears).




More information about the pypy-issue mailing list