[Mono-bugs] [Bug 80139][Wis] Changed - Attribute.Equals and Attribute.GetHashCode default implementation inconsistent

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Feb 25 09:43:12 EST 2007


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by peter.dettman at iinet.net.au.

http://bugzilla.ximian.com/show_bug.cgi?id=80139

--- shadow/80139	2007-02-25 09:34:01.000000000 -0500
+++ shadow/80139.tmp.12739	2007-02-25 09:43:12.000000000 -0500
@@ -10,13 +10,12 @@
 Component: CORLIB
 AssignedTo: mono-bugs at ximian.com                            
 ReportedBy: dominic_ullmann at hispeed.ch               
 QAContact: mono-bugs at ximian.com
 TargetMilestone: ---
 URL: 
-Cc: 
 Summary: Attribute.Equals and Attribute.GetHashCode default implementation inconsistent
 
 Description of Problem:
 The default implementation of Attribute.GetHashCode and Attribute.Equals 
 are inconsistent, i.e. Attribute.Equals returns true for instances where 
 Attribute.GetHashCode() returns different values.
@@ -83,6 +82,18 @@
 hashcodes match as well.
 
 ------- Additional Comments From peter.dettman at iinet.net.au  2007-02-25 09:34 -------
 Created an attachment (id=18777)
 Proposed patch
 
+
+------- Additional Comments From peter.dettman at iinet.net.au  2007-02-25 09:43 -------
+The above patch implements Attribute.GetHashCode in a similar way to
+Attribute.Equals. This includes some refactoring in System.ValueType,
+and a fix to the (internal) implementation of
+ValueType.InternalGetHashCode.
+
+Also includes extra test cases for both Attribute and ValueType.
+
+I would like someone more familiar with the runtime to double-check my
+changes to icall.c (ves_icall_System_ValueType_InternalGetHashCode).
+


More information about the mono-bugs mailing list