#10250: segfault when multiplying QQ constant and SR vector (with user basis)
------------------------------+---------------------------------------------
   Reporter:  jason           |       Owner:  jason, was
       Type:  defect          |      Status:  new       
   Priority:  major           |   Milestone:            
  Component:  linear algebra  |    Keywords:            
     Author:                  |    Upstream:  N/A       
   Reviewer:                  |      Merged:            
Work_issues:                  |  
------------------------------+---------------------------------------------
Changes (by jason):

 * cc: craigcitro, robertwb (added)


Comment:

 Ccing Robert B and Craig Citro, since it looks like it might be a problem
 in the coercion system, and maybe in how the coercion system builds a
 module with a user basis:

 {{{
 sage: V=(QQ^2).span_of_basis([[1,1]])
 sage: v=V([1,1])
 sage: w=v.change_ring(SR)
 sage: w.parent()
 Vector space of degree 2 and dimension 1 over Symbolic Ring
 User basis matrix:
 [1 1]
 sage: 3*w
 (3, 3)
 sage: x=sqrt(2)*v # here the coercion system builds the parent of x
 sage: x.parent() is w.parent()
 False
 sage: x.parent()
 Vector space of degree 2 and dimension 1 over Symbolic Ring
 User basis matrix:
 [1 1]
 sage: x.parent() == w.parent() # equivalent parents between x and w
 True
 sage: 3*x # but we get a segfault when multiplying x by something


 ------------------------------------------------------------
 Unhandled SIGSEGV: A segmentation fault occurred in Sage.
 This probably occurred because a *compiled* component
 of Sage has a bug in it (typically accessing invalid memory)
 or is not properly wrapped with _sig_on, _sig_off.
 You might want to run Sage under gdb with 'sage -gdb' to debug this.
 Sage will now terminate (sorry).
 ------------------------------------------------------------



 }}}

 Also, notice that trying to get the coercion system to explain itself also
 segfaults:
 {{{
 sage: cm = sage.structure.element.get_coercion_model(); cm
 <sage.structure.coerce.CoercionModel_cache_maps object at 0x101f3b6b0>
 sage: sage: V=(QQ^2).span_of_basis([[1,1]])
 sage: v=V([1,1])
 sage: x=sqrt(2)*v
 sage: cm.explain(3.parent(), x.parent())


 ------------------------------------------------------------
 Unhandled SIGSEGV: A segmentation fault occurred in Sage.
 This probably occurred because a *compiled* component
 of Sage has a bug in it (typically accessing invalid memory)
 or is not properly wrapped with _sig_on, _sig_off.
 You might want to run Sage under gdb with 'sage -gdb' to debug this.
 Sage will now terminate (sorry).
 ------------------------------------------------------------

 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10250#comment:4>
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.

Reply via email to