[PATCH] winecrt0: Do not expect jmp_buf to be aligned in __wine_longjmp on x86_64.

Alexandre Julliard julliard at winehq.org
Tue Jul 14 02:35:26 CDT 2020


Paul Gofman <pgofman at codeweavers.com> writes:

> On 7/13/20 23:05, Alexandre Julliard wrote:
>> Paul Gofman <pgofman at codeweavers.com> writes:
>>
>>> There is no guarantee that jmp_buf is 16 bytes aligned.
>> It is using DECLSPEC_ALIGN(16) though. Where do you see it being
>> misaligned?
>>
> Well, I was getting that after turning NtOpenDirectoryObject locally
> into syscall thunk from  __TRY / __CATCH block used by IsBadStringPtrW()
> from debugstr_w(). But after you pointed out that alignment is there
> which I initially missed, I found that the stack alignment which is
> present in syscall thunk generated code seems not to be performed
> (apparently, not intentionally) if the size of arguments is <= 0x20. I
> should rather be fixing that, sorry for the noise.

Fixing that wouldn't hurt, but note that all API functions should
already be using force_align_arg_pointer. If that doesn't work correctly
we'll have other problems.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list