ntdll: Properly reset the stack environment at thread exit on ARM64.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49301
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
feature/deterministic
Alexandre Julliard 2020-06-01 17:50:02 +02:00
parent c0319e0eab
commit 87fa906a84
1 changed files with 3 additions and 1 deletions

View File

@ -238,11 +238,13 @@ void signal_init_thread( TEB *teb )
extern void DECLSPEC_NORETURN call_thread_exit_func( int status, void (*func)(int), TEB *teb );
__ASM_GLOBAL_FUNC( call_thread_exit_func,
"stp x29, x30, [sp,#-16]!\n\t"
"ldr x3, [x2, #0x300]\n\t" /* arm64_thread_data()->exit_frame */
"str xzr, [x2, #0x300]\n\t"
"cbz x3, 1f\n\t"
"mov sp, x3\n"
"1:\tblr x1" )
"1:\tldp x29, x30, [sp], #16\n\t"
"br x1" )
/***********************************************************************
* signal_exit_thread