Ticket #13314: pari-2.5.2.p1.diff
File pari-2.5.2.p1.diff, 2.1 KB (added by , 10 years ago) |
---|
-
SPKG.txt
# HG changeset patch # User Jeroen Demeyer <jdemeyer@cage.ugent.be> # Date 1346244831 -7200 # Node ID 14dd94e887e8e0ff1ecea6c89d3f8817bcc1e4d7 # Parent e7c6dbbea66986c270db45e6222a73d884463717 Trac #13314: add upstream patch rootpol.patch for rootpol(). diff --git a/SPKG.txt b/SPKG.txt
a b 69 69 70 70 == Changelog == 71 71 72 === pari-2.5.2.p1 (Paul Zimmermann, 28 August 2012) === 73 * Ticket #13314: add upstream patch rootpol.patch for rootpol(). 74 72 75 === pari-2.5.2.p0 (Jeroen Demeyer, 1 August 2012) === 73 76 * Ticket #13320: upgrade to version 2.5.2 74 77 * Rename spkg-make to spkg-src -
patches/README.txt
diff --git a/patches/README.txt b/patches/README.txt
a b 42 42 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49330 43 43 This bug manifests itself as a Bus Error on OS X 10.4 PPC with 44 44 gcc-4.6.3. 45 * rootpol.patch: fixes a Segmentation Fault in Sage "roots" (#13314) -
new file patches/rootpol.patch
diff --git a/patches/rootpol.patch b/patches/rootpol.patch new file mode 100644
- + 1 fix typo introduced in 7b985ff8a726e89191d2733b9052b2e2c228bfde 2 "minor improvements root_error()" 3 prod was not re-initialized to 1. 4 5 diff --git a/src/basemath/rootpol.c b/src/basemath/rootpol.c 6 index 3099bb2..0be400f 100644 7 --- a/src/basemath/rootpol.c 8 +++ b/src/basemath/rootpol.c 9 @@ -1611,8 +1611,8 @@ split_0(GEN p, long bit, GEN *F, GEN *G) 10 static GEN 11 root_error(long n, long k, GEN roots_pol, long pari_err, GEN shatzle) 12 { 13 - GEN rho, d, eps, epsbis, eps2, prod, aux, rap = NULL; 14 - long i, j, m; 15 + GEN rho, d, eps, epsbis, eps2, aux, rap = NULL; 16 + long i, j; 17 18 d = cgetg(n+1,t_VEC); 19 for (i=1; i<=n; i++) 20 @@ -1627,11 +1627,11 @@ root_error(long n, long k, GEN roots_pol, long pari_err, GEN shatzle) 21 if (expo(rho) < 0) rho = real_1(DEFAULTPREC); 22 eps = mulrr(rho, shatzle); 23 aux = shiftr(powru(rho,n), pari_err); 24 - prod = NULL; /* 1. */ 25 26 for (j=1; j<=2 || (j<=5 && cmprr(rap, dbltor(1.2)) > 0); j++) 27 { 28 - m = n; 29 + GEN prod = NULL; /* 1. */ 30 + long m = n; 31 epsbis = mulrr(eps, dbltor(1.25)); 32 for (i=1; i<=n; i++) 33 {