mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Remove oleaut32-Vtable_Offset.
Fixed by https://source.winehq.org/git/wine.git/dd012af92a93fdf77ec648e422b4fb96369b42eb.
This commit is contained in:
parent
0cfbc55f24
commit
1d511798d0
@ -1,71 +0,0 @@
|
||||
From f650db00efa6e175b314f7e926bd92d0eb1f56b8 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Mon, 2 May 2016 15:49:53 +0800
|
||||
Subject: oleaut32: Extend a vtable offset before calling 64-bit DispCallFunc()
|
||||
for a 32-bit typelib.
|
||||
|
||||
DispCallFunc() divides a passed in offset by sizeof(void*) to calculate
|
||||
the actual function offset in the vtable, so in order to make this work
|
||||
under win64 for a 32-bit typelib ITypeInfo::Invoke() needs to compensate
|
||||
the logic by multiplying the offset by 2.
|
||||
---
|
||||
dlls/oleaut32/typelib.c | 22 ++++++++++++++++++++--
|
||||
1 file changed, 20 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
|
||||
index 517e515..971f746 100644
|
||||
--- a/dlls/oleaut32/typelib.c
|
||||
+++ b/dlls/oleaut32/typelib.c
|
||||
@@ -3547,6 +3547,10 @@ static ITypeLib2* ITypeLib2_Constructor_MSFT(LPVOID pLib, DWORD dwTLBLength)
|
||||
/* name, eventually add to a hash table */
|
||||
pTypeLibImpl->Name = MSFT_ReadName(&cx, tlbHeader.NameOffset);
|
||||
|
||||
+ TRACE("%s, syskind %d, version %d.%d, flags %04x\n",
|
||||
+ debugstr_w(pTypeLibImpl->Name->str), pTypeLibImpl->syskind,
|
||||
+ pTypeLibImpl->ver_major, pTypeLibImpl->ver_minor, pTypeLibImpl->libflags);
|
||||
+
|
||||
/* help info */
|
||||
pTypeLibImpl->DocString = MSFT_ReadString(&cx, tlbHeader.helpstring);
|
||||
pTypeLibImpl->HelpFile = MSFT_ReadString(&cx, tlbHeader.helpfile);
|
||||
@@ -6960,6 +6964,7 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
|
||||
UINT cNamedArgs = pDispParams->cNamedArgs;
|
||||
DISPID *rgdispidNamedArgs = pDispParams->rgdispidNamedArgs;
|
||||
UINT vargs_converted=0;
|
||||
+ ULONG_PTR offset;
|
||||
|
||||
hres = S_OK;
|
||||
|
||||
@@ -7204,7 +7209,11 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
|
||||
break;
|
||||
}
|
||||
}
|
||||
- if (FAILED(hres)) goto func_fail; /* FIXME: we don't free changed types here */
|
||||
+ if (FAILED(hres))
|
||||
+ {
|
||||
+ ERR("failed: %08x\n", hres);
|
||||
+ goto func_fail; /* FIXME: we don't free changed types here */
|
||||
+ }
|
||||
|
||||
/* VT_VOID is a special case for return types, so it is not
|
||||
* handled in the general function */
|
||||
@@ -7217,7 +7226,16 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
|
||||
if (FAILED(hres)) goto func_fail; /* FIXME: we don't free changed types here */
|
||||
}
|
||||
|
||||
- hres = DispCallFunc(pIUnk, func_desc->oVft & 0xFFFC, func_desc->callconv,
|
||||
+ offset = func_desc->oVft & 0xFFFC;
|
||||
+#ifdef _WIN64
|
||||
+ if (This->pTypeLib->syskind == SYS_WIN32)
|
||||
+ {
|
||||
+ offset *= 2;
|
||||
+ TRACE("extended offset to %#lx for SYS_WIN32\n", offset);
|
||||
+ }
|
||||
+#endif
|
||||
+ TRACE("func_desc->oVft %#x, offset %#lx\n", func_desc->oVft, offset);
|
||||
+ hres = DispCallFunc(pIUnk, offset, func_desc->callconv,
|
||||
V_VT(&varresult), func_desc->cParams, rgvt,
|
||||
prgpvarg, &varresult);
|
||||
|
||||
--
|
||||
2.8.0
|
||||
|
@ -1 +0,0 @@
|
||||
Fixes: [35268] Extend a vtable offset before calling 64-bit DispCallFunc() for a 32-bit typelib
|
@ -307,7 +307,6 @@ patch_enable_all ()
|
||||
enable_oleaut32_OleLoadPicture="$1"
|
||||
enable_oleaut32_OleLoadPictureFile="$1"
|
||||
enable_oleaut32_TKIND_COCLASS="$1"
|
||||
enable_oleaut32_Vtable_Offset="$1"
|
||||
enable_oleaut32_x86_64_Marshaller="$1"
|
||||
enable_opengl32_Revert_Disable_Ext="$1"
|
||||
enable_opengl32_glDebugMessageCallback="$1"
|
||||
@ -1175,9 +1174,6 @@ patch_enable ()
|
||||
oleaut32-TKIND_COCLASS)
|
||||
enable_oleaut32_TKIND_COCLASS="$2"
|
||||
;;
|
||||
oleaut32-Vtable_Offset)
|
||||
enable_oleaut32_Vtable_Offset="$2"
|
||||
;;
|
||||
oleaut32-x86_64_Marshaller)
|
||||
enable_oleaut32_x86_64_Marshaller="$2"
|
||||
;;
|
||||
@ -7018,21 +7014,6 @@ if test "$enable_oleaut32_TKIND_COCLASS" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset oleaut32-Vtable_Offset
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#35268] Extend a vtable offset before calling 64-bit DispCallFunc() for a 32-bit typelib
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/oleaut32/typelib.c
|
||||
# |
|
||||
if test "$enable_oleaut32_Vtable_Offset" -eq 1; then
|
||||
patch_apply oleaut32-Vtable_Offset/0001-oleaut32-Extend-a-vtable-offset-before-calling-64-bi.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Dmitry Timoshkov", "oleaut32: Extend a vtable offset before calling 64-bit DispCallFunc() for a 32-bit typelib.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset oleaut32-x86_64_Marshaller
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
Loading…
Reference in New Issue
Block a user