summaryrefslogtreecommitdiff
path: root/packaging/0014-Fix-inconsistency-between-GetHasCode-and-Equals-1351.patch
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/0014-Fix-inconsistency-between-GetHasCode-and-Equals-1351.patch')
-rw-r--r--packaging/0014-Fix-inconsistency-between-GetHasCode-and-Equals-1351.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/packaging/0014-Fix-inconsistency-between-GetHasCode-and-Equals-1351.patch b/packaging/0014-Fix-inconsistency-between-GetHasCode-and-Equals-1351.patch
new file mode 100644
index 0000000000..0de7bc3f50
--- /dev/null
+++ b/packaging/0014-Fix-inconsistency-between-GetHasCode-and-Equals-1351.patch
@@ -0,0 +1,35 @@
+From 6b2a3ed5103ca11bb928ccf94b6b50bfdbb3d115 Mon Sep 17 00:00:00 2001
+From: Jonghyun Park <parjong@gmail.com>
+Date: Wed, 23 Aug 2017 05:56:01 +0900
+Subject: [PATCH 14/23] Fix inconsistency between GetHasCode and Equals
+ (#13513)
+
+---
+ src/mscorlib/src/System/MulticastDelegate.cs | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/src/mscorlib/src/System/MulticastDelegate.cs b/src/mscorlib/src/System/MulticastDelegate.cs
+index 988bf2b..1d701f0 100644
+--- a/src/mscorlib/src/System/MulticastDelegate.cs
++++ b/src/mscorlib/src/System/MulticastDelegate.cs
+@@ -452,6 +452,17 @@ namespace System
+ if (IsUnmanagedFunctionPtr())
+ return ValueType.GetHashCodeOfPtr(_methodPtr) ^ ValueType.GetHashCodeOfPtr(_methodPtrAux);
+
++ if (_invocationCount != (IntPtr)0)
++ {
++ var t = _invocationList as Delegate;
++
++ if (t != null)
++ {
++ // this is a secure/wrapper delegate so we need to unwrap and check the inner one
++ return t.GetHashCode();
++ }
++ }
++
+ Object[] invocationList = _invocationList as Object[];
+ if (invocationList == null)
+ {
+--
+1.9.1
+