1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00
Commit graph

1608 commits

Author SHA1 Message Date
Alexandre Julliard
4d8ee6bb18 widl: Add /robust flags in correlation descriptors. 2024-04-02 23:30:10 +02:00
Alexandre Julliard
8bac669056 rpcrt4: Make sure that the stack is set when catching an exception.
Fixes a test crash in interpreted mode.
2024-03-29 22:45:34 +01:00
Alexandre Julliard
2d801c46c7 rpcrt4: Return the correct failure for a NULL binding handle.
Fixes a test crash in interpreted mode.
2024-03-29 22:45:14 +01:00
Alexandre Julliard
69849bd2ee widl: Don't skip a pointer level for pointers to pointers to strings. 2024-03-27 11:26:10 +01:00
Alexandre Julliard
18bdd435f1 rpcrt4/tests: Fix some malloc/HeapAlloc mismatches.
Fixes regressions caused by a38e05636d.
2024-02-16 16:43:18 +01:00
Paul Gofman
139d624787 rpcrt4: Force debug info in critical sections. 2024-02-16 11:36:30 +01:00
Alex Henrie
a38e05636d rpcrt4/tests: Use CRT allocation functions. 2024-02-14 19:19:32 +01:00
Haoyang Chen
6b6aff8322 rpcrt4/tests: Test explicit_handle. 2023-12-04 22:10:23 +01:00
Haoyang Chen
9a4de1b727 rpcrt4: Support for explicit handle passing.
If explicit_handle is defined in the idl file, c/s use explicit handles,
then an explicit handle must be passed in to the server-side  interface
2023-12-04 22:10:23 +01:00
Alistair Leslie-Hughes
9b26ea16a3 rpcrt4: Remove DECLSPEC_HIDDEN usage. 2023-11-14 11:45:39 +01:00
Alexandre Julliard
00fb82c315 rpcrt4: Generate vtbl delegating thunks at compile time. 2023-11-09 23:00:40 +01:00
Alexandre Julliard
439ce3a3ae rpcrt4: Generate stubless thunks at compile time. 2023-11-09 23:00:40 +01:00
Alexandre Julliard
c432eac726 makefiles: Always use the global SOURCES variable for .idl files. 2023-11-01 22:43:50 +01:00
Alexandre Julliard
3acb058a55 rpcrt4: Add SEH annotations to ARM64 assembly code. 2023-09-20 11:18:10 +02:00
Alexandre Julliard
a345f985c0 rpcrt4/tests: Use nameless unions/structs. 2023-07-21 21:27:35 +02:00
Alexandre Julliard
d8e35c51c9 rpcrt4: Use nameless union/structs. 2023-07-05 17:03:30 +02:00
Alex Henrie
f0b0c7f464 rpcrt4: Don't use GetProcAddress for ole32 functions.
It's more elegant to put ole32 in the DELAYIMPORTS.
2023-06-15 10:03:47 +02:00
Alex Henrie
3fd8c85fd1 rpcrt4: Replace RPCRT4_strndupA with strdup. 2023-06-08 12:02:55 +02:00
Dmitry Timoshkov
70a847248f rpcrt4: Avoid casting an object to IUnknown.
Cast its interface member to IUnknown instead.
2023-02-10 19:09:16 +01:00
Dmitry Timoshkov
4ec4bdff73 rpcrt4: Mark the buffer as invalid in NdrProxyFreeBuffer(). 2023-02-10 19:09:16 +01:00
Huw Davies
fc6af061fa rpcrt4/tests: Remove a failing test. 2023-02-08 09:02:00 +01:00
Zebediah Figura
fe8f63ce72 rpcrt4: Use CONTAINING_RECORD in release_delegating_vtbl(). 2023-01-24 18:19:47 +01:00
Zebediah Figura
10bbf79d53 rpcrt4: Use a flexible array member in struct delegating_vtbl. 2023-01-24 18:19:47 +01:00
Zebediah Figura
e85afda3b5 rpcrt4: Rename "ref_counted_vtbl" to "struct delegating_vtbl".
Get rid of the typedef, and give it a slightly more salient name (and one that
matches more of the surrounding code).
2023-01-24 18:19:44 +01:00
Zebediah Figura
4ad5de2841 rpcrt4: Use a CONTAINING_RECORD helper to retrieve CInterfaceStubHeader from CStdStubBuffer. 2023-01-24 18:19:43 +01:00
Zebediah Figura
180edc5a4f rpcrt4: Use a CONTAINING_RECORD helper to retrieve CStdStubBuffer from IRpcStubBuffer. 2023-01-24 18:19:43 +01:00
Rémi Bernon
3356ba6810 rpcrt4/tests: Avoid invalid free of static string. 2023-01-13 11:16:04 +01:00
Eric Pouech
7ffcd6609f rpcrt4: Fix GCC12.2 warnings.
GCC12.2 warns about dereferencing a pointer to RpcPktHdr
while it has been allocated to the size of one of the packet
(hence smaller in some cases).

/home/eric/work/wine/dlls/rpcrt4/rpc_message.c:111:26: warning: array subscript 'RpcPktHdr[0]' is partly outside array bounds of 'unsigned char[24]' [-Warray-bounds]
  111 |   Header->common.rpc_ver = RPC_VER_MAJOR;

This patch fixes the warnings by accessing the created object
through a pointer to their type (and not through the union).

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
2022-12-14 18:30:08 +01:00
Eric Pouech
5d2547cef4 rpcrt4: Pass a common header to RPCRT4_BuildCommonHeader.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
2022-12-14 18:30:08 +01:00
Alexandre Julliard
9fc9c91bf4 include: Use proper dllimports for rpcrt4 functions. 2022-12-07 13:51:37 +01:00
Alex Henrie
3bfc4493cb rpcrt4: Use standard C functions for memory allocation. 2022-12-05 23:28:03 +01:00
Alex Henrie
e09c93de7b rpcrt4/tests: Don't use an array of pointers in test_conf_complex_struct.
An array of pointers isn't conformant on 64-bit and will overrun the
destination buffer when unmarshalling. Since the purpose of this
function is to test a conformant FC_BOGUS_STRUCT, use one that is
conformant on both 32-bit and 64-bit.

The revised test coincidentally reveals that there is a problem with the
padding or alignment after a marshalled 16-bit enum, which will need to
be addressed separately.

Co-authored-by: Zebediah Figura <z.figura12@gmail.com>
2022-12-03 00:05:17 +01:00
Eric Pouech
c5e23886b2 rpcrt4: Fix unexpected exception in ndr_marshal tests.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52909
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
2022-11-07 21:13:32 +01:00
Francois Gouget
e7be6ae2f1 rpcrt4/tests: Fix the spelling of a couple of comments. 2022-10-20 20:58:06 +02:00
Kevin Puetz
a7be4256f6 rpcrt4: Add a refcount owned by MIDL_STUB_MESSAGE.
In cases where this could have been use-after-free, exceptions were
caught/hidden by RpcTryFinally, but still lead to leaks since
NdrProxyFreeBuffer wasn't able to call IRPCChannelBuffer::FreeBuffer.

StdProxy_GetChannel() now AddRef() on its return value (used to set
__proxy_frame::_StubMsg::pRpcChannelBuffer), and NdrProxyFreeBuffer()
calls the corresponding Release() and clears the now-weak pointer.
This makes the behavior of these function match the observed test
results, and fixes the crash/leak when a proxy is released mid-Invoke.
2022-10-11 17:13:02 +02:00
Kevin Puetz
59f39b325d rpcrt4/tests: Add tests for lifetime of IRpcChannelBuffer.
It's possible for a proxy to be released during the middle of an Invoke.
E.g. a specific case where this happened was a single-shot event sink
which, upon receiving the event it was waiting for, would immediately
call DispEventUnadvise. This removed the proxy pointing to that sink
from the connection point's list of subscribers and released the last
refcount on the proxy itself.

Therefore, all state used to complete an RPC call must be on the stack;
once NdrProxySendReceive pumps STA messages and permits reentrancy,
the proxy cannot be accessed or relied on to own anything.

Add test showing MIDL_STUB_MESSAGE::pRpcChannelBuffer owns a refcount
(to ensure it can read [out] parameters from the channel)
2022-10-11 17:13:00 +02:00
Brendan Shanks
3f0166fa89 rpcrt4: Set the name of internal threads. 2022-09-26 21:49:54 +02:00
Zebediah Figura
bad509227a rpcrt4: Add SEH annotations to NdrClientCall2(). 2022-09-07 21:16:49 +02:00
Zebediah Figura
a5322fc94f rpcrt4: Make NdrClientCall2() SEH-compatible. 2022-09-07 21:16:49 +02:00
Zebediah Figura
5d01faed77 rpcrt4: Add SEH annotations to NdrClientCall3(). 2022-09-07 21:16:49 +02:00
Zebediah Figura
abe75a5f22 rpcrt4: Make NdrClientCall3() SEH-compatible. 2022-09-07 21:16:49 +02:00
Zebediah Figura
37ae068773 rpcrt4: Add SEH annotations to Ndr64AsyncClientCall(). 2022-09-07 21:16:49 +02:00
Zebediah Figura
16713f5245 rpcrt4: Make Ndr64AsyncClientCall() SEH-compatible. 2022-09-07 21:16:48 +02:00
Zhiyi Zhang
a0301f7db6 rpcrt4: Implement I_RpcBindingInqLocalClientPID().
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2022-07-18 19:17:44 +02:00
Zhiyi Zhang
056dbb04de rpcrt4/tests: Add I_RpcBindingInqLocalClientPID() tests.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2022-07-18 19:17:44 +02:00
Drew Ronneberg
a1f8a75aa4 rpcrt4: Remove obsolete -D_RPCRT4_ from Makefile.in.
Signed-off-by: Drew Ronneberg <drew_ronneberg@yahoo.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-02 11:35:26 +02:00
Eric Pouech
ed5ade575b rpcrt4: Don't cast ptrdiff_t to ULONG in traces, use %I instead.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-11 10:13:45 +02:00
Eric Pouech
c5a5143234 rpcrt4/tests: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-04 10:06:50 +01:00
Eric Pouech
b67a843c1a rpcrt4: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-17 18:57:15 +01:00
Eric Pouech
bb1fc33570 include/msvcrt: Add attribute((format)) to printf and scanf -like APIs.
Fix a bunch of warnings generated by this patch and the migration of
GUID.Data1 to long in ae2693e2c4

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-31 18:38:55 +01:00