[Mono-bugs] [Bug 648828] New: Sorting arrays of unequal lengths causes unexpected exception
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Sat Oct 23 02:37:47 EDT 2010
https://bugzilla.novell.com/show_bug.cgi?id=648828
https://bugzilla.novell.com/show_bug.cgi?id=648828#c0
Summary: Sorting arrays of unequal lengths causes unexpected
exception
Classification: Mono
Product: Mono: Class Libraries
Version: 2.8.x
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: P5 - None
Component: System
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: anthony-b at railsimroutes.co.uk
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
There seems to have been a bug introduced between Mono 2.6 and Mono 2.8
concerning the sorting of arrays, likely in System or mscorlib (wherever
System.Array is implemented).
For example:
double[] a = new double[115];
int[] b = new int[256];
Array.Sort<double, int> (a, b, 0, 115);
In Mono 2.6 (and .NET 2.0), this works fine by accessing only the first 115
elements in each array (which exist in both). In Mono 2.8, however, an
exception is raised:
"Value does not fall within the expected range"
Likely, Mono tries to check the bounds of the arrays to see if they match, even
though there is no need, given the constraint of index and length in the
arguments. In fact, if the arrays are equal in size, the sort works without any
problem.
--
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