Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Au <andrewau@microsoft.com>2017-10-25 20:00:06 +0300
committerAndrew Au <andrewau@microsoft.com>2017-10-25 20:00:06 +0300
commit0cce7221a8aeab73cd7da8b5866772a283d07ef2 (patch)
tree70814086b1161436130146c8442bb5955e1d72d5 /src/System.Private.TypeLoader
parent84de0fd20808d3e7b038a033b13928cefb564414 (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.cs3
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);
}