Opened 9 years ago
Closed 9 years ago
#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 | Merged in: | sage-4.7.alpha5 |
Authors: | Martin Albrecht | Reviewers: | Alexander Dreyer |
Report Upstream: | None of the above - read trac for reasoning. | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
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 (1)
Change History (6)
Changed 9 years ago by
comment:1 Changed 9 years ago by
- Description modified (diff)
- Status changed from new to needs_review
comment:2 Changed 9 years ago by
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?
comment:3 Changed 9 years ago by
- Status changed from needs_review to positive_review
Applies smoothly on Sage 4.6.2 with the PolyBoRi? 0.7.0-patch, tested in sage/{rings,crypto,libs
} succeed. So positive review!
comment:4 Changed 9 years ago by
- Reviewers set to Alexander Dreyer
comment:5 Changed 9 years ago by
- Merged in set to sage-4.7.alpha5
- Resolution set to fixed
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
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.