On Thu May 11 16:09:42 2023 +0000, Alexandre Julliard wrote:
But initilize value of sp on signal stack is 16n instead of 16n-8.
Where are you seeing that? It sounds like a bug in your kernel/emulator.
dlls\ntdll\unix\server.c ``` static int init_thread_pipe(void) { int reply_pipe[2]; stack_t ss;
ss.ss_sp = get_signal_stack(); ss.ss_size = signal_stack_size; ss.ss_flags = 0; sigaltstack( &ss, NULL );
if (server_pipe( reply_pipe ) == -1) server_protocol_perror( "pipe" ); if (server_pipe( ntdll_get_thread_data()->wait_fd ) == -1) server_protocol_perror( "pipe" ); wine_server_send_fd( reply_pipe[1] ); wine_server_send_fd( ntdll_get_thread_data()->wait_fd[1] ); ntdll_get_thread_data()->reply_fd = reply_pipe[0]; return reply_pipe[1]; } ``` get_signal_stack() return a value of 16n
signal_stack_size = 0x10000 - 0x3800 is also 16n
so value of stack top is 16n
but on x86_64, value of sp at begin of signal handler must be 16n-8