#13314: segmentation fault with roots over ComplexField
----------------------------------------------------------------+-----------
Reporter: zimmerma |
Owner: burcin
Type: defect |
Status: new
Priority: major |
Milestone: sage-5.3
Component: calculus |
Resolution:
Keywords: | Work
issues:
Report Upstream: Fixed upstream, but not in a stable release. |
Reviewers:
Authors: | Merged
in:
Dependencies: |
Stopgaps:
----------------------------------------------------------------+-----------
Changes (by zimmerma):
* upstream: Reported upstream. Developers acknowledge bug. => Fixed
upstream, but not in a stable release.
Comment:
the bug is fixed with the following Pari patch (from Karim Belabas):
{{{
fix typo introduced in 7b985ff8a726e89191d2733b9052b2e2c228bfde
"minor improvements root_error()"
prod was not re-initialized to 1.
diff --git a/src/basemath/rootpol.c b/src/basemath/rootpol.c
index 3099bb2..0be400f 100644
--- a/src/basemath/rootpol.c
+++ b/src/basemath/rootpol.c
@@ -1611,8 +1611,8 @@ split_0(GEN p, long bit, GEN *F, GEN *G)
static GEN
root_error(long n, long k, GEN roots_pol, long pari_err, GEN shatzle)
{
- GEN rho, d, eps, epsbis, eps2, prod, aux, rap = NULL;
- long i, j, m;
+ GEN rho, d, eps, epsbis, eps2, aux, rap = NULL;
+ long i, j;
d = cgetg(n+1,t_VEC);
for (i=1; i<=n; i++)
@@ -1627,11 +1627,11 @@ root_error(long n, long k, GEN roots_pol, long
pari_err\
, GEN shatzle)
if (expo(rho) < 0) rho = real_1(DEFAULTPREC);
eps = mulrr(rho, shatzle);
aux = shiftr(powru(rho,n), pari_err);
- prod = NULL; /* 1. */
for (j=1; j<=2 || (j<=5 && cmprr(rap, dbltor(1.2)) > 0); j++)
{
- m = n;
+ GEN prod = NULL; /* 1. */
+ long m = n;
epsbis = mulrr(eps, dbltor(1.25));
for (i=1; i<=n; i++)
{
}}}
Note this bug is fixed in the "master" branch upstream (2.6.*, no official
release yet).
Paul
PS: I leave for 3 weeks of vacations, feel free to submit a proper patch
in the meantime.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13314#comment:9>
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.