Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Blocks] Remove a block callback validation that's apparently too eager.
The validation verifies that the function pointer for a block callback is the same the return value from the method's MethodInfo.MethodHandle.GetFunctionPointer() method. In actual code, it's equivalent to validating that the following always prints "Equal: true": ```cs [UnmanagedCallersOnly] public static void Invoke () {} static void Test () { delegate* unmanaged<void> fptr1 = &Invoke; IntPtr fptr2 = GetType ().GetMethod ("Invoke").MethodHandle.GetFunctionPointer (); Console.WriteLine ($"fptr1: 0x{((IntPtr) fptr1).ToString ("x")}"); Console.WriteLine ($"fptr2: 0x{fptr2.ToString ("x")}"); Console.WriteLine ($"Equal: ((IntPtr) fptr1) == fptr2}"); // prints "Equal: true" for me } ``` However, this isn't documented, and some feedback indicates it's certainly not a valid assumption for CoreCLR: https://discord.com/channels/732297728826277939/732582981163548703/1242473425759633488 And there's also a customer running into this validation, apparently withou cause: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2054534 So just remove it.