Package: python2.7 Version: 2.7.2-8 Severity: normal % (echo -n 'print '; /usr/games/primes 2 2000000 | sed 's/$/+\\/g'; echo 0) > out.py % ls -l out.py -rw-r--r-- 1 adl adl 1399822 Dec 9 22:38 out.py % wc -l out.py 148934 out.py % python out.py zsh: segmentation fault python out.py
The above is a (lame) attempt to sum all primes below 2000000. It constructs a large file "out.py" of the form print 2+\ 3+\ 5+\ ... 1999979+\ 1999993+\ 0 and Python segfaults when reading that. Maybe some stack overflow in a recursive evaluation? Anyway it would be nice to diagnose the error with something else than a segfault. For instance running ruby on the same input fails with a meaningful error message: % ruby out.py out.py:140429: stack level too deep (SystemStackError) -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 3.0.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages python2.7 depends on: ii libbz2-1.0 1.0.6-1 ii libc6 2.13-21 ii libdb4.8 4.8.30-11 ii libexpat1 2.0.1-7.2 ii libncursesw5 5.9-4 ii libreadline6 6.2-8 ii libsqlite3-0 3.7.9-2 ii libtinfo5 5.9-4 ii mime-support 3.51-1 ii python2.7-minimal 2.7.2-8 python2.7 recommends no packages. Versions of packages python2.7 suggests: ii binutils 2.22-1 ii python2.7-doc 2.7.2-8 -- no debconf information -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

