#10435: Invalid write in bitsets
-----------------------------+----------------------------------------------
   Reporter:  rlm            |       Owner:  jason     
       Type:  defect         |      Status:  needs_work
   Priority:  major          |   Milestone:  sage-4.6.2
  Component:  misc           |    Keywords:            
     Author:  Robert Miller  |    Upstream:  N/A       
   Reviewer:                 |      Merged:            
Work_issues:                 |  
-----------------------------+----------------------------------------------
Changes (by ncohen):

  * status:  needs_review => needs_work


Comment:

 The -testall fails on the file to which the doctest is added... Here is
 what I got :
 {{{
 #!python
 Expected:
     a
 
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
     list a []
     a.size 128
     len(a) 0
     a.limbs 4
     b
 
01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101
     a.in(n)   False
     a.not_in(n)   True
     a.add(n)
 
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
     a.discard(n)
 
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
     a.set_to(n)
 
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
     a.flip(n)
 
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
     a.set_first_n(n)
 
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
     a.first_in_complement()    -1
     a.isempty()  True
     a.eq(b)      False
     a.cmp(b)     -1
     a.issubset(b) True
     a.issuperset(b) False
     a.copy()
 
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
     r.clear()
 
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
     complement a
 
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
     a intersect b
 
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
     a union b
 
01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101
     a minus b
 
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
     a symmetric_difference b
 
01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101
     a.rshift(n)
 
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
     a.lshift(n)
 
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
     a.first()           -1
     a.next(n)           -1
     a.first_diff(b)     1
     a.next_diff(b, n)   -1
     a.hamming_weight()  0
     a.hamming_weight_sparse()  0
     rshifts add  True
     lshifts add  True
     intersection commutes True
     union commutes  True
     not not = id True
     flipped bit  -1
     add bit      -1
     discard bit    -1
     lshift add unset ok True
     rshift set unset ok True
     reallocating a
 
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
     to size 128
 
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
     to size 256
 
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
     to original size
 
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 Got:
     a
 
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
     list a []
     a.size 128
     len(a) 0
     a.limbs 2
     b
 
01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101
     a.in(n)   False
     a.not_in(n)   True
     a.add(n)
 
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
     a.discard(n)
 
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
     a.set_to(n)
 
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
     a.flip(n)
 
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
     a.set_first_n(n)
 
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
     a.first_in_complement()    -1
     a.isempty()  True
     a.eq(b)      False
     a.cmp(b)     -1
     a.issubset(b) True
     a.issuperset(b) False
     a.copy()
 
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
     r.clear()
 
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
     complement a
 
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
     a intersect b
 
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
     a union b
 
01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101
     a minus b
 
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
     a symmetric_difference b
 
01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101
     a.rshift(n)
 
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
     a.lshift(n)
 
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
     a.first()           -1
     a.next(n)           -1
     a.first_diff(b)     1
     a.next_diff(b, n)   -1
     a.hamming_weight()  0
     a.hamming_weight_sparse()  0
     rshifts add  True
     lshifts add  True
     intersection commutes True
     union commutes  True
     not not = id True
     flipped bit  -1
     add bit      -1
     discard bit    -1
     lshift add unset ok True
     rshift set unset ok True
     reallocating a
 
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
     to size 128
 
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
     to size 256
 
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
     to original size
 
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
 }}}

 The only difference I was able to notice is at the 5th line

 Nathann

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