[bcl] Use RuntimeHelpers.GetHashCode () for getting the hash code of … (#5511)
authorZoltan Varga <vargaz@gmail.com>
Wed, 6 Sep 2017 11:56:37 +0000 (07:56 -0400)
committerBernhard Urban <bernhard.urban@xamarin.com>
Wed, 6 Sep 2017 11:56:37 +0000 (13:56 +0200)
commit586d10d3ababa67742cb1cb907460afe30896f96
tree46c49f87d6923321172cea583a67e3d970aed340
parenta78a103fcb497e08d7e3c22cf6789f20a7c59aac
[bcl] Use RuntimeHelpers.GetHashCode () for getting the hash code of … (#5511)

* [bcl] Use RuntimeHelpers.GetHashCode () for getting the hash code of the delegate target to avoid calling user defined hash code implementations which can throw exceptions. Fixes a regression introduced by a48bc439850869e565833d7fe6330c289beffe40.

* add test for #59235

https://bugzilla.xamarin.com/show_bug.cgi?id=59235

* [fixup] RuntimeHelpers.GetHashCode handles null
mcs/class/corlib/System/Delegate.cs
mono/tests/Makefile.am
mono/tests/delegate-disposed-hashcode.cs [new file with mode: 0644]