#13940: Calling ntl.zz_p(x,0) crashes sage
---------------------------+------------------------------------------------
Reporter: mjo | Owner: AlexGhitza
Type: defect | Status: new
Priority: minor | Milestone: sage-5.6
Component: algebra | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
---------------------------+------------------------------------------------
Changes (by nbruin):
* priority: major => minor
Comment:
`sage/libs/ntl/ntl_lzz_p.pyx`, line 57:
{{{
The class zz_p implements arithmetic modulo p, for p smaller than a
machine word.
NOTE: This type is provided mostly for completeness, and shouldn't
be used in any production code.
}}}
so that would make this a rather minor issue, perhaps.
`gdb` traceback:
{{{
#0 0x00000031cfe36285 in raise () from /lib64/libc.so.6
#1 0x00000031cfe37b9b in abort () from /lib64/libc.so.6
#2 0x00007fffed65fa67 in global_NTL_error_callback () from
/usr/local/sage/5.6b1/local/lib/libcsage.so
#3 0x00007fffed3ceb7f in NTL::Error (s=0x7fffed40bc2f "zz_pContext: p
must be > 1") at tools.c:48
}}}
so it's simply the `0` it's tripping over. Either the wrapper should catch
invalid arguments (expensive?) or the code should be executing with an
signal handler in place to catch the abort (`sig_on` switch is
expensive!). Cheap option: document that people should check their inputs
or risk coredump. This is a low-level interface for testing purposes after
all.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13940#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.