Opened 7 years ago
Closed 7 years ago
#14082 closed defect (fixed)
PARI stack overflow crashes Sage
Reported by: | jdemeyer | Owned by: | jdemeyer |
---|---|---|---|
Priority: | critical | Milestone: | sage-5.8 |
Component: | c_lib | Keywords: | |
Cc: | Merged in: | sage-5.8.beta3 | |
Authors: | Jeroen Demeyer | Reviewers: | David Roe |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | #13618 | Stopgaps: |
Description (last modified by )
The following crashes Sage hard:
sage: i = CDF.0 sage: fz=animate([line([zeta(s+i*t) for t in srange(0,50,0.01)]) for s in srange(0,0.9,0.01)],xmin=-1.5,ymin=-2,xmax=2.5,ymax=2) *** the PARI stack overflows ! current stack size: 16000000 (15.259 Mbytes) [hint] you can increase GP stack with allocatemem() *** Error in the PARI system. End of program.
The problem is simple: instead of using the proper PARI interface in sage/libs/pari/gen.pyx
, for some reason PARI is called directly in sage/rings/complex_double.pyx
. This interface misses some features, such as cleaning up the PARI stack :-)
This code goes back to
changeset: 1292:28dfa54b6a23 parent: 1273:97f9271f8637 user: William Stein <wstein@gmail.com> date: Sun Sep 24 23:13:32 2006 -0700 summary: Finished the 2nd draft of the double precision complex numbers.
Solution: use the proper PARI interface instead.
Attachments (1)
Change History (10)
comment:1 Changed 7 years ago by
- Description modified (diff)
comment:2 Changed 7 years ago by
- Description modified (diff)
comment:3 Changed 7 years ago by
- Description modified (diff)
comment:4 Changed 7 years ago by
- Description modified (diff)
comment:5 Changed 7 years ago by
- Status changed from new to needs_review
comment:6 Changed 7 years ago by
- Description modified (diff)
comment:7 Changed 7 years ago by
- Reviewers set to David Roe
- Status changed from needs_review to positive_review
Changed 7 years ago by
comment:9 Changed 7 years ago by
- Merged in set to sage-5.8.beta3
- Resolution set to fixed
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
This looks good, and the following change means that our eta function now agrees with Mathematica (and PARI as well)