[PATCH] rpcrt4: Handle absense of RPC flags in call_stubless_func() thunk.
Zebediah Figura
z.figura12 at gmail.com
Thu Oct 4 09:22:44 CDT 2018
On 04/10/18 07:51, Huw Davies wrote:
> On Wed, Oct 03, 2018 at 12:08:21PM -0500, Zebediah Figura wrote:
>> If Oi_HAS_RPCFLAGS is not set, then the stack size is at offset 4, not 8.
>>
>> Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
>> ---
>> dlls/rpcrt4/cproxy.c | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/dlls/rpcrt4/cproxy.c b/dlls/rpcrt4/cproxy.c
>> index 2f49bb5..39dd34e 100644
>> --- a/dlls/rpcrt4/cproxy.c
>> +++ b/dlls/rpcrt4/cproxy.c
>> @@ -64,7 +64,13 @@ __ASM_GLOBAL_FUNC(call_stubless_func,
>> "movl 8(%ecx),%edx\n\t" /* info->FormatStringOffset */
>> "movzwl (%edx,%eax,2),%edx\n\t" /* FormatStringOffset[index] */
>> "addl 4(%ecx),%edx\n\t" /* info->ProcFormatString + offset */
>> + "testb $0x08,1(%edx)\n\t" /* Oi_HAS_RPCFLAGS */
>> + "jz 1f\n\t"
>> "movzwl 8(%edx),%eax\n\t" /* arguments size */
>> + "jmp 2f\n\t"
>> + "1:\n\t"
>> + "movzwl 4(%edx),%eax\n\t"
>> + "2:\n\t"
>> "pushl %eax\n\t"
>> __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
>> "leal 8(%esp),%eax\n\t" /* &This */
>
> Actually, thinking about this a bit more, it would be nice to avoid
> the jumps. It should be easy enough to mask off the flag bit and
> then use that to calculate the correct offset from %edx.
>
> Huw.
>
>
Sure, can do.
More information about the wine-devel
mailing list