#12371: The graph_decompositions/ code seems to have bounds issues
----------------------------+-----------------------------------------------
   Reporter:  Snark         |          Owner:  jason, ncohen, rlm
       Type:  defect        |         Status:  needs_review      
   Priority:  major         |      Milestone:  sage-5.0          
  Component:  graph theory  |       Keywords:                    
Work_issues:                |       Upstream:  N/A               
   Reviewer:                |         Author:                    
     Merged:                |   Dependencies:                    
----------------------------+-----------------------------------------------
Changes (by ncohen):

  * status:  needs_work => needs_review


Old description:

> That makes the code non-portable ; the patch I provide adds either signed
> or unsigned in each place, which makes the ARM platform pass the tests
> happily.
>
> Notice that it does fix the current problem but there are still two
> problems with the code:
>  1. in vertex_separation.pyx, we still have "minimums[i] = n" which is an
> unsigned char getting an unsigned int ;
>  1. in vertex_separation.pyx, we still have "tmp_count = <unsigned char>
> popcount(i)", where popcount returns an "int".

New description:

 That makes the code non-portable ; the patch I provide adds either signed
 or unsigned in each place, which makes the ARM platform pass the tests
 happily.

 Notice that it does fix the current problem but there are still two
 problems with the code:
  1. in vertex_separation.pyx, we still have "minimums[i] = n" which is an
 unsigned char getting an unsigned int ;
  1. in vertex_separation.pyx, we still have "tmp_count = <unsigned char>
 popcount(i)", where popcount returns an "int".

 APPLY:
     * [attachment:trac_12371.patch]
     * [attachment:trac_popcount.patch]

--

Comment:

 > Both your patches look good, and I would gladly see them go in :-)

 Oh. Then if you think those ones should go, then all that is left to do is
 to review them `:-)`

 And the "is solver" in my previous message was a "is solved", naturally
 `:-p`

 Nathann

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