[Mono-bugs] [Bug 417833] New: BitVector32. CreateSection allows the creation of illegal sections
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Sat Aug 16 06:00:20 EDT 2008
https://bugzilla.novell.com/show_bug.cgi?id=417833
Summary: BitVector32.CreateSection allows the creation of illegal
sections
Product: Mono: Class Libraries
Version: SVN
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: System
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: lunchtimemama at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Created an attachment (id=233729)
--> (https://bugzilla.novell.com/attachment.cgi?id=233729)
This patch fixes the bug and optimizes the HighestSetBit method.
Test Case:
using System;
using System.Collections.Specialized;
class MainClass {
public static void Main (string[] args) {
var section1 = BitVector32.CreateSection (32767);
var section2 = BitVector32.CreateSection (32767, section1);
var section3 = BitVector32.CreateSection (128, section2);
var vector = new BitVector32 (0);
vector[section3] = 128;
Console.WriteLine(vector[section3]);
}
}
Result:
"0"
Expected Result:
An exception should be thrown.
Additional Info:
This is also a problem in .NET 3.5.
--
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