#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 mjo):
On 32-bit machines with PAE and a lot of memory, `sys.maxint` is smaller
than the number of primes that Pari can compute (and `sys.maxint` is the
biggest one we can ask for without triggering the OverflowError). Trying
to append those primes to a python list requires more memory than Pari
does, so it's possible to get a MemoryError there.
I think that trying to test for the not-enough-memory condition here on
x32 is probably doomed. The patch for #11741 has the right idea: on 64-bit
machines, we know that we can't compute close to `sys.maxint` primes
regardless of how much memory is in the machine. On 32-bit machines, just
sidestep the issue and cause a predictable failure.
The actual bug is still fixed: you get python errors instead of segfaults
now. That leaves only the question of whether #11741 is a sufficient
doctest.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5943#comment:15>
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.