# New Ticket Created by  "Stephen Simmons" 
# Please include the string:  [perl #58338]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=58338 >


The attached program, primes.p6 seems to work correctly, except that after
processing the numbers from 1-6000+, it segfaults
Here are the last few lines.  Note that it had already output the first two
chunks, and so it was between 6400 and 10000 when it segfaulted.

7 5939 5953 5981 5987 6007 6011 6029 6037 6043 6047 6053 6067 6073 6079 6089
6091 6101 6113 6121 6131 6133 6143 6151 6163 6173 6197 6199 6203 6211 6217
6221 6229 6241 6247 6257 6263 6269 6271 6277 6287 6299 6301 6311 6317 6323
6329 6337 6343 6353 6359 6361 6367 6373 6379 6389 6397 6421 6427 6449 6451
6469 6473 6481Segmentation fault

real 0m12.937s
user 0m9.519s
sys 0m0.213s

It was hard to capture the exact moment of failure with top, but it was
using 98% cpu and about 80MB of memory.

The primes.p5 attached was written and tested for comparison, and it
completes with a real time of 0.045s, for completing 10000 numbers.

Stephen Simmons

System information:
sully:experiment stephensimmons$ uname -a
Darwin sully.local 9.4.0 Darwin Kernel Version 9.4.0: Mon Jun  9 19:30:53
PDT 2008; root:xnu-1228.5.20~1/RELEASE_I386 i386
sully:experiment stephensimmons$ perl6 -v
This is Rakudo Perl 6, revision 30524 built on parrot 0.7.0-devel
for darwin-thread-multi-2level.

Copyright 2006-2008, The Perl Foundation.

Attachment: primes.p6
Description: Binary data

Attachment: primes.p5
Description: Binary data

Reply via email to