From 1d511798d0db2c11f5e9ac7ece48708275fa41c9 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Sun, 18 Feb 2018 11:26:46 -0600 Subject: [PATCH] Remove oleaut32-Vtable_Offset. Fixed by https://source.winehq.org/git/wine.git/dd012af92a93fdf77ec648e422b4fb96369b42eb. --- ...a-vtable-offset-before-calling-64-bi.patch | 71 ------------------- patches/oleaut32-Vtable_Offset/definition | 1 - patches/patchinstall.sh | 19 ----- 3 files changed, 91 deletions(-) delete mode 100644 patches/oleaut32-Vtable_Offset/0001-oleaut32-Extend-a-vtable-offset-before-calling-64-bi.patch delete mode 100644 patches/oleaut32-Vtable_Offset/definition diff --git a/patches/oleaut32-Vtable_Offset/0001-oleaut32-Extend-a-vtable-offset-before-calling-64-bi.patch b/patches/oleaut32-Vtable_Offset/0001-oleaut32-Extend-a-vtable-offset-before-calling-64-bi.patch deleted file mode 100644 index bd10a1e3..00000000 --- a/patches/oleaut32-Vtable_Offset/0001-oleaut32-Extend-a-vtable-offset-before-calling-64-bi.patch +++ /dev/null @@ -1,71 +0,0 @@ -From f650db00efa6e175b314f7e926bd92d0eb1f56b8 Mon Sep 17 00:00:00 2001 -From: Dmitry Timoshkov -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 - diff --git a/patches/oleaut32-Vtable_Offset/definition b/patches/oleaut32-Vtable_Offset/definition deleted file mode 100644 index 2d1ce18a..00000000 --- a/patches/oleaut32-Vtable_Offset/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: [35268] Extend a vtable offset before calling 64-bit DispCallFunc() for a 32-bit typelib diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 42111c72..2c7d3373 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -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: