Ticket #11019 (closed defect: fixed)
BooleanPolynomial.lex_lead() shouldn't crash on zero
| Reported by: | malb | Owned by: | malb |
|---|---|---|---|
| Priority: | major | Milestone: | sage-4.7 |
| Component: | commutative algebra | Keywords: | polybori, sigsegv |
| Cc: | AlexanderDreyer, PolyBoRi | Work issues: | |
| Report Upstream: | None of the above - read trac for reasoning. | Reviewers: | Alexander Dreyer |
| Authors: | Martin Albrecht | Merged in: | sage-4.7.alpha5 |
| Dependencies: | Stopgaps: |
Description (last modified by malb) (diff)
This is bad:
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
Attachments
Change History
comment:1 Changed 2 years ago by malb
- Status changed from new to needs_review
- Description modified (diff)
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.
comment:2 Changed 2 years ago by AlexanderDreyer
The patch looks good, so code-review by inspection is positive already, I'll apply it for a technical review. But gbcore.py shouldn't call lex_lead on zero, so maybe you can provide me the corresponding examples off-trac for upstream debugging?
Note: See
TracTickets for help on using
tickets.

