From a9950e3ceef6a8cfbfa8d4ed60df1210724036f7 Mon Sep 17 00:00:00 2001 From: Ge van Geldorp Date: Mon, 12 Jan 2009 16:51:40 +0100 Subject: [PATCH] rpcrt4/tests: Remove NdrVaryingArrayUnmarshall() test, it is broken on Windows. The failures in rpcrt4:server on Windows are caused by an access violation thrown in NdrVaryingArrayUnmarshall() called from get_5numbers(). I've created a minimum get_5numbers() test with Microsoft tools and that throws the same access violation. The access violation disappears when zeroing out the StubMsg before calling NdrClientInitializeNew(), so my guess is Windows NdrVaryingArrayUnmarshall() uses an uninitialized member. --- dlls/rpcrt4/tests/server.c | 18 ------------------ dlls/rpcrt4/tests/server.idl | 1 - 2 files changed, 19 deletions(-) diff --git a/dlls/rpcrt4/tests/server.c b/dlls/rpcrt4/tests/server.c index fe4a1e88c57..ce487ee4bb4 100644 --- a/dlls/rpcrt4/tests/server.c +++ b/dlls/rpcrt4/tests/server.c @@ -659,19 +659,6 @@ s_context_handle_test(void) } } -void -s_get_5numbers(int count, pints_t n[5]) -{ - int i; - for (i = 0; i < count; i++) - { - n[i].pi = midl_user_allocate(sizeof(*n[i].pi)); - *n[i].pi = i; - n[i].ppi = NULL; - n[i].pppi = NULL; - } -} - void s_get_numbers(int length, int size, pints_t n[]) { @@ -1238,11 +1225,6 @@ array_tests(void) memset(api, 0, sizeof(api)); pi = HeapAlloc(GetProcessHeap(), 0, sizeof(*pi)); *pi = -1; - api[0].pi = pi; - get_5numbers(1, api); - ok(api[0].pi == pi, "RPC varying array [out] pointer changed from %p to %p\n", pi, api[0].pi); - ok(*api[0].pi == 0, "pi unmarshalled incorrectly %d\n", *api[0].pi); - api[0].pi = pi; get_numbers(1, 1, api); ok(api[0].pi == pi, "RPC conformant varying array [out] pointer changed from %p to %p\n", pi, api[0].pi); diff --git a/dlls/rpcrt4/tests/server.idl b/dlls/rpcrt4/tests/server.idl index 254551e02b2..788516189b4 100644 --- a/dlls/rpcrt4/tests/server.idl +++ b/dlls/rpcrt4/tests/server.idl @@ -335,7 +335,6 @@ cpp_quote("#endif") [size_is(size), length_is(length)] pints_t numbers[]; } numbers_struct_t; - void get_5numbers([in] int count, [out, length_is(count)] pints_t pn[5]); void get_numbers([in] int length, [in] int size, [out, length_is(length), size_is(size)] pints_t pn[]); void get_numbers_struct([out] numbers_struct_t **ns);