On 2017-08-10, Richard_L <richar...@lozestech.com> wrote:
> The following string sent to maxima causes a seg-fault and core dump:

##
Advertising

> '#$is
> (equal(-(_SAGE_VAR_r13^2*_SAGE_VAR_r23-_SAGE_VAR_r23^3)/((-_SAGE_VAR_r23^4)+2*_SAGE_VAR_r13^2*_SAGE_VAR_r23^2-_SAGE_VAR_r13^4+_SAGE_VAR_r12^4),0))$'
>
Looks like domain:complex and assume are both needed to trigger this
error. declare(..., real) isn't needed to trigger it.
(%i1) foo :-(b^2*c-c^3)/((-c^4)+2*b^2*c^2-b^4+a^4)$
(%i2) sign(foo);
(%o2) pnz
(%i3) assume(a>0, b>0, c>0);
(%o3) [a > 0, b > 0, c > 0]
(%i4) sign(foo);
(%o4) pnz
(%i5) domain:complex;
(%o5) complex
(%i6) sign(foo);
^C
[I get a stack overflow at this point if I don't break it]
(%i7) forget(a>0, b>0, c>0);
(%o7) [a > 0, b > 0, c > 0]
(%i8) sign(foo);
(%o8) pnz
Tracing shows that the various internal sign functions (SIGN, SIGN1,
etc) are calling each other and never bottoming out. The arguments don't
appear to get more complex so my first guess is that 'sign' wants to
find the sign of some term which needs to find the sign of another term
which leads back to the first one sooner or later.
A workaround might be to set domain:real instead of domain:complex.
If someone can make a bug report and include these notes, that would be
great. I didn't try to find a simpler example but maybe one exists.
best,
Robert Dodier
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.