[pypy-dev] the program will make pypy say "Segment fault"

mike c coolbutuseless at gmail.com
Mon Feb 27 15:04:38 CET 2012


Hi All,
Ronny has put a stripped down version of this bug on the tracker:
https://bugs.pypy.org/issue1073



On Mon, Feb 27, 2012 at 9:39 PM, Spacelee <fjctlzy at gmail.com> wrote:

> on Ubuntu 64bit, 6G memory, 4Core, python2.7.2
>
> Program:
>
>
> import datetime
>
> tmp_str1 = 'aaaaaaaaaa' * 10000
> tmp_str2 = 'bbbbbbbbbb' * 10000
> tmp_str3 = 'bbbbbbbbbb' * 10000
> tmp_str4 = 'bbbbbbbbbb' * 10000
>
>
> s = datetime.datetime.now()
> for i in xrange(100000):
> a = "%s%s%s%s" % (tmp_str1, tmp_str2, tmp_str3, tmp_str4)
> e = datetime.datetime.now()
> print str(e-s)
>
>
> s = datetime.datetime.now()
> for i in xrange(100000):
> a = tmp_str1 + tmp_str2 + tmp_str3 + tmp_str4
> e = datetime.datetime.now()
> print str(e-s)
>
>
>
> Ouput:
> Segment Fault
>
> --
> *Space Lee*
>
>
> _______________________________________________
> pypy-dev mailing list
> pypy-dev at python.org
> http://mail.python.org/mailman/listinfo/pypy-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20120228/409a6f6e/attachment.html>


More information about the pypy-dev mailing list