http://bugzilla.novell.com/show_bug.cgi?id=533257


           Summary: Dictionary <K,V> goes into infinite loop trying to
                    retrieve a value
    Classification: Mono
           Product: Mono: Class Libraries
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          Found By: ---


When debugging some moonlight websites I came across a bug in Dictionary<K, V>
where it would go into an infinite loop in this code:

while (cur != NO_SLOT) {
    // The ordering is important for compatibility with MS and strange
    // Object.Equals () implementations
    if (linkSlots [cur].HashCode == hashCode && hcp.Equals (keySlots [cur],
key)) {
        value = valueSlots [cur];
        return true;
    }
    cur = linkSlots [cur].Next;
}

linkSlots[cur].Next is returning the same value as 'cur', so we loop forever
checking the same slot. If it's important, the dictionary in question was a
Dictionary<IntPtr, ToggleRef> from Moonlight.

-- 
Configure bugmail: http://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.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to