#10833: Unhandled SIGSEGV on large expand of iterated polynomial
--------------------------+-------------------------------------------------
Reporter: katestange | Owner: AlexGhitza
Type: defect | Status: new
Priority: minor | Milestone: sage-4.6.2
Component: algebra | Keywords: expand, polynomial, polynomial ring
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
--------------------------+-------------------------------------------------
Verified on 'Sage Version 4.6, Release Date: 2010-10-30' on my laptop and
on nt.sagemath.org.
If I do this:
{{{
R.<x,c> = PolynomialRing(QQ,2)
phi(x) = x^2 + c
def iterkate(n):
pol = x
for i in range(1,n):
pol = phi(pol)
return pol
g = expand(iterkate(7))
}}}
Then I get this on the last command:
{{{
------------------------------------------------------------
Unhandled SIGSEGV: A segmentation fault occurred in Sage.
This probably occurred because a *compiled* component
of Sage has a bug in it (typically accessing invalid memory)
or is not properly wrapped with _sig_on, _sig_off.
You might want to run Sage under gdb with 'sage -gdb' to debug this.
Sage will now terminate (sorry).
------------------------------------------------------------
}}}
But if I do this
{{{
R.<x,c> = PolynomialRing(QQ,2)
g = expand( (((((x^2 + c)^2 + c)^2 + c)^2 + c)^2 + c)^2 + c )
}}}
Then it is perfectly happy and g is a degree 64 polynomial (but in both
cases it's the same polynomial I'm asking it to expand!). In the first
example, it will crash if the "7" is anything above about 6. At 6, it is
unreliable, and crashes sometimes. 5 and lower seems fine. I wasn't sure
how to pare down to a more minimal example, given the circumstances.
It's entirely possible I'm doing something stupid here and interacting
with sage in a bad way. If so, it's still a bug, but I'd love to know
what I'm doing that sage doesn't like.
Anyway, here's some debug info:
{{{
Program received signal SIGSEGV, Segmentation fault.
0x03b3c3f5 in void
std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<GiNaC::expair*,
std::vector<GiNaC::expair, std::allocator<GiNaC::expair> > >,
GiNaC::expair,
GiNaC::expair_rest_is_less>(__gnu_cxx::__normal_iterator<GiNaC::expair*,
std::vector<GiNaC::expair, std::allocator<GiNaC::expair> > >,
GiNaC::expair, GiNaC::expair_rest_is_less) ()
from /usr/local/lib/sage-4.1.1-linux-
Ubuntu_9.04-i686-Linux/local/lib/libpynac-0.2.so.1
Current language: auto
The current source language is "auto; currently c++".
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10833>
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.