This repository has been archived by the owner on Nov 1, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Function pointer equality comparison was not handling cross-module po…
…inters correctly when optimizations were enabled (causes target pointers to be wrapped in jump stubs sometimes). The delegate equality comparison was hitting this bug. The DynamicGenerics test was failing in one of its delegate tests when the delegate's construction method from the shared library got inlined in the test code: 1) One delegate was created by new'ing up a Func<> delegate (ends up creating a delegate where the delegate's thunk pointer is a jump stub to the thunk code) 2) Another delegate was created by calling MethodInfo.CreateDelegate (ends up creating a delegate where the delegate's thunk pointer is the thunk code directly) 3) The test was comparing the 2 delegates for equality. MulticastDelegate.Equals returned false because of the difference in the thunk pointers, even though they really point at the same target code. [tfs-changeset: 1572883]
- Loading branch information