#5943: Sage 3.4.2.a0: len(prime_range(2^50)) segfaults
---------------------------------+------------------------------------------
Reporter: mabshoff | Owner: was
Type: defect | Status: new
Priority: critical | Milestone: sage-4.8
Component: number theory | Resolution:
Keywords: | Work_issues:
Upstream: N/A | Reviewer: Keshav Kini
Author: Michael Orlitzky | Merged:
Dependencies: |
---------------------------------+------------------------------------------
Comment(by kini):
Hmm. For comparison, on x86_64, within a doctest:
{{{
Expected:
Traceback (most recent call last):
...
PariError: not enough memory (28)
xyzzy
Got:
Traceback (most recent call last):
File "/opt/sage-4.8.alpha4/local/bin/ncadoctest.py", line 1231, in
run_one_test
self.run_one_example(test, example, filename, compileflags)
File "/opt/sage-4.8.alpha4/local/bin/sagedoctest.py", line 38, in
run_one_example
OrigDocTestRunner.run_one_example(self, test, example, filename,
compileflags)
File "/opt/sage-4.8.alpha4/local/bin/ncadoctest.py", line 1172, in
run_one_example
compileflags, 1) in test.globs
File "<doctest __main__.example_1[16]>", line 1, in <module>
prime_range(sys.maxint)###line 122:_sage_ >>>
prime_range(sys.maxint)
File "fast_arith.pyx", line 56, in sage.rings.fast_arith.prime_range
(sage/rings/fast_arith.c:4149)
File "fast_arith.pyx", line 150, in
sage.rings.fast_arith.prime_range (sage/rings/fast_arith.c:3795)
File "gen.pyx", line 10262, in sage.libs.pari.gen._pari_trap
(sage/libs/pari/gen.c:49373)
PariError: not enough memory (28)
}}}
What's `sys.maxint` on hawk? I don't have an account there. On my machine:
{{{
sage: sys.maxint
9223372036854775807
}}}
Maybe the doctest should test a specific number to avoid vagaries of
various platforms? Or maybe we should dig around in the code to find out
why there are two different code paths that run out of memory in this
operation with two different error messages.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5943#comment:12>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.