#11019: BooleanPolynomial.lex_lead() shouldn't crash on zero
-----------------------------------+----------------------------------------
Reporter: malb | Owner: malb
Type: defect | Status: needs_review
Priority: major | Milestone: sage-4.7
Component: commutative algebra | Keywords: polybori, sigsegv
Author: Martin Albrecht | Upstream: None of the above - read
trac for reasoning.
Reviewer: | Merged:
Work_issues: |
-----------------------------------+----------------------------------------
Changes (by malb):
* status: new => needs_review
Old description:
> This is bad:
>
> {{{
> #!python
> sage: B.<a,b,c> = BooleanPolynomialRing()
> sage: B(0).lex_lead()
> terminate called after throwing an instance of
> 'polybori::PBoRiGenericError<7u>'
> what(): Illegal operation on zero diagram or (sub-)polynomial.
> /home/malb/Sage/current/local/bin/sage-sage: line 300: 10210 Aborted
> sage-ipython "$@" -i
> }}}
New description:
This is bad:
{{{
#!python
sage: B.<a,b,c> = BooleanPolynomialRing()
sage: B(0).lex_lead()
terminate called after throwing an instance of
'polybori::PBoRiGenericError<7u>'
what(): Illegal operation on zero diagram or (sub-)polynomial.
/home/malb/Sage/current/local/bin/sage-sage: line 300: 10210 Aborted
sage-ipython "$@" -i
}}}
'''Apply''' attachment:trac_11019.patch
--
Comment:
Btw. I couldn't go for throwing an error because sometimes {{{gbcore.py}}}
calls lex_lead() on zero. So I opted for returning zero which seems to
work.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11019#comment:1>
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.