#10901: segfault in roots() in wrong ring
-----------------------------+----------------------------------------------
Reporter: dsm | Owner: tbd
Type: defect | Status: new
Priority: minor | Milestone:
Component: PLEASE CHANGE | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
-----------------------------+----------------------------------------------
If you pass .roots() a ring that it can't handle, usually you get a nice
exception, but in some cases it segfaults [4.6.2, OS X 10.6.6]:
{{{
sage: var("a")
a
sage: R.<x> = SR[]
sage: f = x-a
sage: parent(f)
Univariate Polynomial Ring in x over Symbolic Ring
sage: f.roots(RR)
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: 13 at address: 0x0000000000000000
0x0000000103c811f5 in mpfr_clear ()
(gdb) bt
#0 0x0000000103c811f5 in mpfr_clear ()
#1 0x0000000105440341 in
__pyx_tp_dealloc_4sage_5rings_10polynomial_26polynomial_real_mpfr_dense_PolynomialRealDense
()
#2 0x000000010006d6f9 in type_call ()
#3 0x000000010000bc32 in PyObject_Call ()
#4 0x00000001000b333e in PyEval_EvalFrameEx ()
#5 0x00000001000b8fd2 in PyEval_EvalCodeEx ()
#6 0x000000010003af45 in function_call ()
#7 0x000000010000bc32 in PyObject_Call ()
#8 0x000000010001dc3b in instancemethod_call ()
#9 0x000000010000bc32 in PyObject_Call ()
#10 0x000000010406c46e in
__pyx_f_4sage_9structure_11coerce_maps_24DefaultConvertMap_unique__call_
()
#11 0x000000010232f690 in
__pyx_pf_4sage_9structure_6parent_6Parent___call__ ()
#12 0x000000010000bc32 in PyObject_Call ()
#13 0x0000000105103580 in
__pyx_pf_4sage_5rings_10polynomial_18polynomial_element_10Polynomial_change_ring
(__pyx_v_self=0x10cb32ae0, __pyx_v_R=<value temporarily unavailable, due
to optimizations>) at sage/rings/polynomial/polynomial_element.c:16432
#14 0x000000010000bc32 in PyObject_Call ()
#15 0x0000000105152ec0 in
__pyx_pf_4sage_5rings_10polynomial_18polynomial_element_10Polynomial_roots
(__pyx_v_self=0x10cb32ae0, __pyx_args=<value temporarily unavailable, due
to optimizations>, __pyx_kwds=<value temporarily unavailable, due to
optimizations>) at sage/rings/polynomial/polynomial_element.c:31609
#16 0x00000001000b7709 in PyEval_EvalFrameEx ()
#17 0x00000001000b8fd2 in PyEval_EvalCodeEx ()
#18 0x00000001000b872e in PyEval_EvalFrameEx ()
#19 0x00000001000b8fd2 in PyEval_EvalCodeEx ()
#20 0x00000001000b6185 in PyEval_EvalFrameEx ()
#21 0x00000001000b8fd2 in PyEval_EvalCodeEx ()
#22 0x00000001000b6185 in PyEval_EvalFrameEx ()
#23 0x00000001000b7b01 in PyEval_EvalFrameEx ()
#24 0x00000001000b8fd2 in PyEval_EvalCodeEx ()
#25 0x00000001000b6185 in PyEval_EvalFrameEx ()
#26 0x00000001000b8fd2 in PyEval_EvalCodeEx ()
#27 0x00000001000b6185 in PyEval_EvalFrameEx ()
#28 0x00000001000b8fd2 in PyEval_EvalCodeEx ()
#29 0x00000001000b6185 in PyEval_EvalFrameEx ()
#30 0x00000001000b8fd2 in PyEval_EvalCodeEx ()
#31 0x00000001000b90b6 in PyEval_EvalCode ()
#32 0x00000001000dde5e in PyRun_FileExFlags ()
#33 0x00000001000de119 in PyRun_SimpleFileExFlags ()
#34 0x00000001000eb61b in Py_Main ()
#35 0x0000000100000f14 in start ()
}}}
and similarly for CC.
[Not sure which component this falls under; anyone who knows, please
change.]
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10901>
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.