the program will make pypy say "Segment fault"

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*

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@gmail.com> wrote:

Hi, On Mon, Feb 27, 2012 at 12:39, Spacelee <fjctlzy@gmail.com> wrote:
Segment Fault
Thanks for the report! Fixed, probably, by b9733690c4de. The issue occurs with strings (or other variable-sized mallocs) with a number of items that is constant for the JIT, and whose total constant size is between 67584 bytes (135168 on 64-bit) and 16MB. Bah. A bientôt, Armin.

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@gmail.com> wrote:

Hi, On Mon, Feb 27, 2012 at 12:39, Spacelee <fjctlzy@gmail.com> wrote:
Segment Fault
Thanks for the report! Fixed, probably, by b9733690c4de. The issue occurs with strings (or other variable-sized mallocs) with a number of items that is constant for the JIT, and whose total constant size is between 67584 bytes (135168 on 64-bit) and 16MB. Bah. A bientôt, Armin.
participants (3)
-
Armin Rigo
-
mike c
-
Spacelee