Fixes: a70e3059c66a375d6757af4ec60a4b2e11896be5 Fixes: 6db89702a3f7e7563c96f4ea3836b9cb261a8685
-- v2: d3d8: Allocate what Validate(Vertex|Pixel)Shader return with HeapAlloc.
From: Alex Henrie alexhenrie24@gmail.com
Fixes: a70e3059c66a375d6757af4ec60a4b2e11896be5 Fixes: 6db89702a3f7e7563c96f4ea3836b9cb261a8685 --- dlls/d3d8/d3d8_main.c | 4 ++-- dlls/d3d8/tests/device.c | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/dlls/d3d8/d3d8_main.c b/dlls/d3d8/d3d8_main.c index 45234c01add..12905ffbce4 100644 --- a/dlls/d3d8/d3d8_main.c +++ b/dlls/d3d8/d3d8_main.c @@ -95,7 +95,7 @@ done: if (!return_error) message = ""; message_size = strlen(message) + 1; - if (errors && (*errors = malloc(message_size))) + if (errors && (*errors = HeapAlloc(GetProcessHeap(), 0, message_size))) memcpy(*errors, message, message_size);
return hr; @@ -140,7 +140,7 @@ done: if (!return_error) message = ""; message_size = strlen(message) + 1; - if (errors && (*errors = malloc(message_size))) + if (errors && (*errors = HeapAlloc(GetProcessHeap(), 0, message_size))) memcpy(*errors, message, message_size);
return hr; diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c index 3f6174b98db..fd06e1bf79d 100644 --- a/dlls/d3d8/tests/device.c +++ b/dlls/d3d8/tests/device.c @@ -5051,11 +5051,11 @@ static void test_validate_vs(void) hr = ValidateVertexShader(NULL, NULL, NULL, FALSE, &errors); ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr); ok(!*errors, "Got unexpected string "%s".\n", errors); - free(errors); + HeapFree(GetProcessHeap(), 0, errors); hr = ValidateVertexShader(NULL, NULL, NULL, TRUE, &errors); ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr); ok(!!*errors, "Got unexpected empty string.\n"); - free(errors); + HeapFree(GetProcessHeap(), 0, errors);
hr = ValidateVertexShader(vs_code, NULL, NULL, FALSE, NULL); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); @@ -5064,7 +5064,7 @@ static void test_validate_vs(void) hr = ValidateVertexShader(vs_code, NULL, NULL, TRUE, &errors); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(!*errors, "Got unexpected string "%s".\n", errors); - free(errors); + HeapFree(GetProcessHeap(), 0, errors);
hr = ValidateVertexShader(vs_code, declaration_valid1, NULL, FALSE, NULL); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); @@ -5101,11 +5101,11 @@ static void test_validate_vs(void) hr = ValidateVertexShader(vs_code, NULL, NULL, FALSE, &errors); ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr); ok(!*errors, "Got unexpected string "%s".\n", errors); - free(errors); + HeapFree(GetProcessHeap(), 0, errors); hr = ValidateVertexShader(vs_code, NULL, NULL, TRUE, &errors); ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr); ok(!!*errors, "Got unexpected empty string.\n"); - free(errors); + HeapFree(GetProcessHeap(), 0, errors); }
static void test_validate_ps(void) @@ -5149,7 +5149,7 @@ static void test_validate_ps(void) hr = ValidatePixelShader(ps_1_1_code, NULL, TRUE, &errors); ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); ok(!*errors, "Got unexpected string "%s".\n", errors); - free(errors); + HeapFree(GetProcessHeap(), 0, errors);
memset(&caps, 0, sizeof(caps)); caps.PixelShaderVersion = D3DPS_VERSION(1, 1); @@ -5179,11 +5179,11 @@ static void test_validate_ps(void) hr = ValidatePixelShader(ps_1_1_code, NULL, FALSE, &errors); ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr); ok(!*errors, "Got unexpected string "%s".\n", errors); - free(errors); + HeapFree(GetProcessHeap(), 0, errors); hr = ValidatePixelShader(ps_1_1_code, NULL, TRUE, &errors); ok(hr == E_FAIL, "Got unexpected hr %#lx.\n", hr); ok(!!*errors, "Got unexpected empty string.\n"); - free(errors); + HeapFree(GetProcessHeap(), 0, errors); }
static void test_volume_get_container(void)
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=139930
Your paranoid android.
=== debian11b (64 bit WoW report) ===
comctl32: button.c:801: Test failed: [0] expected uItemState 16, got 80 button.c:801: Test failed: [0] expected uItemState 16, got 80 button.c:810: Test failed: [0] expected uItemState 0, got 64 button.c:810: Test failed: [0] expected uItemState 0, got 64 button.c:819: Test failed: [0] expected uItemState 0, got 64 button.c:819: Test failed: [0] expected uItemState 0, got 64 button.c:834: Test failed: expected state 0, got 0200 button.c:838: Test failed: [0] expected uItemState 1, got 65 button.c:838: Test failed: [0] expected uItemState 1, got 65 button.c:847: Test failed: expected state 0x0004, got 0204 button.c:854: Test failed: [0] expected uItemState 0, got 64 button.c:854: Test failed: [0] expected uItemState 0, got 64 button.c:863: Test failed: expected state 0, got 0200 button.c:898: Test failed: [0] expected uItemState 0, got 64 button.c:898: Test failed: [0] expected uItemState 0, got 64 button.c:898: Test failed: [0] expected uItemState 0, got 64 button.c:898: Test failed: [0] expected uItemState 0, got 64
This merge request was approved by Zebediah Figura.
This merge request was approved by Jan Sikorski.