[Mono-bugs] [Bug 327053] New: System.IO.MemoryStream is too eager in zeroing data

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Sep 21 05:20:20 EDT 2007


https://bugzilla.novell.com/show_bug.cgi?id=327053

           Summary: System.IO.MemoryStream is too eager in zeroing data
           Product: Mono: Class Libraries
           Version: 1.2
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: mono-bugs at ximian.com
        ReportedBy: skolima at gmail.com
         QAContact: mono-bugs at ximian.com
                CC: skolima at gmail.com
          Found By: ---


When a MemoryStream that was created around an array is shrinked and the
expanded, it should no longer allow access to the elements that were present in
the array before the shrink. However, MS.Net MemoryStream does this by zeroing
the underlying array when the expansion is performed  - mono clears the array
on shrink. This is somewhat of a corner case, but the behaviour differes none
the less. Also, clearing on expansion improves performance a bit (well, at
least when the MemoryStream is only shrinked - it changes nothing when a
shrink/expand cycle is performed). A test case (passing on MS.Net) is attached.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list