Ticket #1211 (closed defect: fixed)
[with patch, with positive review] NTL crash in polynomial remainder over ZZ
| Reported by: | ncalexan | Owned by: | dmharvey |
|---|---|---|---|
| Priority: | critical | Milestone: | sage-2.8.15 |
| Component: | commutative algebra | Keywords: | ntl polynomial remainder ZZ crash segfault |
| Cc: | Work issues: | ||
| Report Upstream: | Reviewers: | ||
| Authors: | Merged in: | ||
| Dependencies: | Stopgaps: |
Description
sage: x = ZZ['x'].0 sage: x^2 % (2*x - 1) DivRem: quotient not defined over ZZ /Users/ncalexan/sage/local/bin/sage-sage: line 218: 28251 Abort trap sage-ipython -c "$SAGE_STARTUP_COMMAND;" "$@" Process SAGE exited abnormally with code 134
Mac OS X 10.4 Intel Core2Duo, Darwin mero.local 8.10.1 Darwin Kernel Version 8.10.1: Wed May 23 16:33:00 PDT 2007; root:xnu-792.22.5~1/RELEASE_I386 i386 i386
Attachments
Change History
comment:1 Changed 5 years ago by dmharvey
- Owner changed from malb to dmharvey
- Status changed from new to assigned
comment:2 Changed 5 years ago by dmharvey
I'm about to attach a patch that fixes this (and also fixes division by zero crash too).
sage: R.<x> = PolynomialRing(ZZ) sage: x^2 % (2*x - 1) --------------------------------------------------------------------------- <type 'exceptions.ArithmeticError'> Traceback (most recent call last) /Users/david/sage-2.8.14/<ipython console> in <module>() /Users/david/sage-2.8.14/polynomial_element.pyx in sage.rings.polynomial.polynomial_element.Polynomial.__mod__() /Users/david/sage-2.8.14/polynomial_integer_dense_ntl.pyx in sage.rings.polynomial.polynomial_integer_dense_ntl.Polynomial_integer_dense_ntl.quo_rem() <type 'exceptions.ArithmeticError'>: division not exact in Z[x] (consider coercing to Q[x] first) sage: x^2 % 0 --------------------------------------------------------------------------- <type 'exceptions.ArithmeticError'> Traceback (most recent call last) /Users/david/sage-2.8.14/<ipython console> in <module>() /Users/david/sage-2.8.14/polynomial_element.pyx in sage.rings.polynomial.polynomial_element.Polynomial.__mod__() /Users/david/sage-2.8.14/polynomial_integer_dense_ntl.pyx in sage.rings.polynomial.polynomial_integer_dense_ntl.Polynomial_integer_dense_ntl.quo_rem() <type 'exceptions.ArithmeticError'>: division by zero polynomial sage: (2*x^2) % (2*x) 0
comment:3 Changed 5 years ago by dmharvey
- Summary changed from NTL crash in polynomial remainder over ZZ to [with patch] NTL crash in polynomial remainder over ZZ
Note: See
TracTickets for help on using
tickets.

