diff options
author | Andrew Au <andrewau@microsoft.com> | 2017-10-25 20:00:06 +0300 |
---|---|---|
committer | Andrew Au <andrewau@microsoft.com> | 2017-10-25 20:00:06 +0300 |
commit | 0cce7221a8aeab73cd7da8b5866772a283d07ef2 (patch) | |
tree | 70814086b1161436130146c8442bb5955e1d72d5 /src/System.Private.TypeLoader | |
parent | 84de0fd20808d3e7b038a033b13928cefb564414 (diff) |
VirtualMethodFix - This change fixes the currently broken interface method dispatch in FuncEval.
[tfs-changeset: 1679167]
Diffstat (limited to 'src/System.Private.TypeLoader')
-rw-r--r-- | src/System.Private.TypeLoader/src/Internal/Runtime/DebuggerSupport/DebuggerSupport.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/System.Private.TypeLoader/src/Internal/Runtime/DebuggerSupport/DebuggerSupport.cs b/src/System.Private.TypeLoader/src/Internal/Runtime/DebuggerSupport/DebuggerSupport.cs index 84fd6e436..f05e8dc47 100644 --- a/src/System.Private.TypeLoader/src/Internal/Runtime/DebuggerSupport/DebuggerSupport.cs +++ b/src/System.Private.TypeLoader/src/Internal/Runtime/DebuggerSupport/DebuggerSupport.cs @@ -87,7 +87,8 @@ namespace Internal.Runtime.DebuggerSupport public static unsafe IntPtr GetInterfaceDispatchFunctionPointer(IntPtr thisPointer, RuntimeTypeHandle interfaceType, uint virtualMethodSlot) { - object instance = Unsafe.As<IntPtr, object>(ref thisPointer); + IntPtr locationOfThisPointer = (IntPtr)(&thisPointer); + object instance = Unsafe.As<IntPtr, Object>(ref *(IntPtr*)locationOfThisPointer); return RuntimeAugments.ResolveDispatch(instance, interfaceType, (int)virtualMethodSlot); } |