Jan. 23, 2024
9:50 a.m.
Jinoh Kang (@iamahuman) commented about dlls/ntdll/unix/server.c:
> NTSTATUS WINAPI NtContinue( CONTEXT *context, BOOLEAN alertable )
> +{
> + /* NtContinueEx accepts both */
> + return NtContinueEx(context, (CONTINUE_OPTIONS *)(intptr_t)alertable);
> +}
> +
> +
> +/***********************************************************************
> + * NtContinueEx (NTDLL.@)
> + */
> +NTSTATUS WINAPI NtContinueEx( CONTEXT *context, CONTINUE_OPTIONS *options )
> {
> user_apc_t apc;
> NTSTATUS status;
> + BOOLEAN alertable;
> + const intptr_t alignment_bits = 16 - 1; /* (16-bytes on amd64) */
1. Does 32-bit architectures (i386) reject `options` when it's not 16-byte aligned? What if they only require just 8-byte or even 4-byte alignment?
2. Do we have any app that relies on `STATUS_DATATYPE_MISALIGNMENT` to be returned on misaligned `options`? Otherwise, I think this is unnecessary. The error handling code doesn't have tests, so it might even just bitrot.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4761#note_58644