#7794: PolynomialRing_integral_domain ignores Ctrl-C and segfaults
--------------------------+-------------------------------------------------
Reporter: SimonKing | Owner: AlexGhitza
Type: defect | Status: needs_review
Priority: critical | Milestone: sage-4.7.1
Component: algebra | Keywords: Polynomial Ring KeyboardInterrupt
Work_issues: | Upstream: N/A
Reviewer: Simon King | Author:
Merged: | Dependencies:
--------------------------+-------------------------------------------------
Comment(by SimonKing):
Meanwhile I wonder:
In the original version of get_cparent, an attribute error was caught
internally, and then zero was returned. Now, you return zero on error, and
you do not catch the error internally. Couldn't that result in confusion,
if the argument `parent` has no `modulus()` method?
Perhaps it is safer to keep modify the internal try-except clause (namely
replace the bare `except:` by `except AttributeError:`) and declare the
Cython funtion as `cdef inline cparent get_cparent(parent) except -1:`.
Namely, -1 can not result as a regular return value (the return value is
the modulus of a ring, and thus a positive number), and so it would be
safe to reserve -1 for errors (then you can also remove the question mark
from `except?`).
Will you do this change (if you agree with my arguing), or shall I make
the change in a separate patch?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7794#comment:11>
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.