From e8e54f08389084f0d12dcdbc097b841e8c3c5fdf Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Tue, 19 Jan 2016 16:31:10 +0100 Subject: [PATCH] Added patch to fix uninitialized animation variable in D3DXCreateAnimationController tests. --- ...nitialize-animation-variable-before-.patch | 47 +++++++++++++++++++ patches/patchinstall.sh | 16 +++++++ 2 files changed, 63 insertions(+) create mode 100644 patches/d3dx9_36-Uninitialized_Memory/0001-d3dx9_36-tests-Initialize-animation-variable-before-.patch diff --git a/patches/d3dx9_36-Uninitialized_Memory/0001-d3dx9_36-tests-Initialize-animation-variable-before-.patch b/patches/d3dx9_36-Uninitialized_Memory/0001-d3dx9_36-tests-Initialize-animation-variable-before-.patch new file mode 100644 index 00000000..c5c6d8f9 --- /dev/null +++ b/patches/d3dx9_36-Uninitialized_Memory/0001-d3dx9_36-tests-Initialize-animation-variable-before-.patch @@ -0,0 +1,47 @@ +From 8a6a57c05ad79d3f2f9b059eae4a2d4a663bb8c0 Mon Sep 17 00:00:00 2001 +From: Sebastian Lackner +Date: Tue, 19 Jan 2016 16:28:40 +0100 +Subject: d3dx9_36/tests: Initialize animation variable before + D3DXCreateAnimationController test. + +--- + dlls/d3dx9_36/tests/mesh.c | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c +index 7c86190..52b109c 100644 +--- a/dlls/d3dx9_36/tests/mesh.c ++++ b/dlls/d3dx9_36/tests/mesh.c +@@ -11109,21 +11109,25 @@ static void D3DXCreateAnimationControllerTest(void) + hr = D3DXCreateAnimationController(0, 0, 0, 0, NULL); + ok(hr == D3D_OK, "Got unexpected hr returned %#x.\n", hr); + ++ animation = (void *)0xdeadbeef; + hr = D3DXCreateAnimationController(0, 1, 1, 1, &animation); + ok(hr == D3D_OK, "Got unexpected hr returned %#x.\n", hr); +- ok(!animation, "Got unexpected animation %p.\n", animation); ++ ok(animation == (void *)0xdeadbeef, "Got unexpected animation %p.\n", animation); + ++ animation = (void *)0xdeadbeef; + hr = D3DXCreateAnimationController(1, 0, 1, 1, &animation); + ok(hr == D3D_OK, "Got unexpected hr returned %#x.\n", hr); +- ok(!animation, "Got unexpected animation %p.\n", animation); ++ ok(animation == (void *)0xdeadbeef, "Got unexpected animation %p.\n", animation); + ++ animation = (void *)0xdeadbeef; + hr = D3DXCreateAnimationController(1, 1, 0, 1, &animation); + ok(hr == D3D_OK, "Got unexpected hr returned %#x.\n", hr); +- ok(!animation, "Got unexpected animation %p.\n", animation); ++ ok(animation == (void *)0xdeadbeef, "Got unexpected animation %p.\n", animation); + ++ animation = (void *)0xdeadbeef; + hr = D3DXCreateAnimationController(1, 1, 1, 0, &animation); + ok(hr == D3D_OK, "Got unexpected hr returned %#x.\n", hr); +- ok(!animation, "Got unexpected animation %p.\n", animation); ++ ok(animation == (void *)0xdeadbeef, "Got unexpected animation %p.\n", animation); + + hr = D3DXCreateAnimationController(1, 1, 1, 1, &animation); + ok(hr == D3D_OK, "Got unexpected hr returned %#x.\n", hr); +-- +2.6.4 + diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 97681660..fd8e2340 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -118,6 +118,7 @@ patch_enable_all () enable_d3dx9_36_GetShaderSemantics="$1" enable_d3dx9_36_Optimize_Inplace="$1" enable_d3dx9_36_Texture_Align="$1" + enable_d3dx9_36_Uninitialized_Memory="$1" enable_d3dx9_36_UpdateSkinnedMesh="$1" enable_dbghelp_Debug_Symbols="$1" enable_ddraw_EnumSurfaces="$1" @@ -486,6 +487,9 @@ patch_enable () d3dx9_36-Texture_Align) enable_d3dx9_36_Texture_Align="$2" ;; + d3dx9_36-Uninitialized_Memory) + enable_d3dx9_36_Uninitialized_Memory="$2" + ;; d3dx9_36-UpdateSkinnedMesh) enable_d3dx9_36_UpdateSkinnedMesh="$2" ;; @@ -3046,6 +3050,18 @@ if test "$enable_d3dx9_36_Texture_Align" -eq 1; then ) >> "$patchlist" fi +# Patchset d3dx9_36-Uninitialized_Memory +# | +# | Modified files: +# | * dlls/d3dx9_36/tests/mesh.c +# | +if test "$enable_d3dx9_36_Uninitialized_Memory" -eq 1; then + patch_apply d3dx9_36-Uninitialized_Memory/0001-d3dx9_36-tests-Initialize-animation-variable-before-.patch + ( + echo '+ { "Sebastian Lackner", "d3dx9_36/tests: Initialize animation variable before D3DXCreateAnimationController test.", 1 },'; + ) >> "$patchlist" +fi + # Patchset d3dx9_36-UpdateSkinnedMesh # | # | This patchset fixes the following Wine bugs: