ntdll: Fix crash on nested thread exit.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2018-02-06 16:06:42 +01:00
parent 8d773e2c83
commit 7ccae68f6c
1 changed files with 1 additions and 1 deletions

View File

@ -2566,6 +2566,7 @@ __ASM_GLOBAL_FUNC( start_thread,
extern void DECLSPEC_NORETURN call_thread_exit_func( int status, void (*func)(int) ); extern void DECLSPEC_NORETURN call_thread_exit_func( int status, void (*func)(int) );
__ASM_GLOBAL_FUNC( call_thread_exit_func, __ASM_GLOBAL_FUNC( call_thread_exit_func,
"movl 8(%esp),%ecx\n\t"
/* fetch exit frame */ /* fetch exit frame */
"movl %fs:0x1f4,%edx\n\t" /* x86_thread_data()->exit_frame */ "movl %fs:0x1f4,%edx\n\t" /* x86_thread_data()->exit_frame */
"testl %edx,%edx\n\t" "testl %edx,%edx\n\t"
@ -2573,7 +2574,6 @@ __ASM_GLOBAL_FUNC( call_thread_exit_func,
"jmp *%ecx\n\t" "jmp *%ecx\n\t"
/* switch to exit frame stack */ /* switch to exit frame stack */
"1:\tmovl 4(%esp),%eax\n\t" "1:\tmovl 4(%esp),%eax\n\t"
"movl 8(%esp),%ecx\n\t"
"movl $0,%fs:0x1f4\n\t" "movl $0,%fs:0x1f4\n\t"
"movl %edx,%ebp\n\t" "movl %edx,%ebp\n\t"
__ASM_CFI(".cfi_def_cfa %ebp,4\n\t") __ASM_CFI(".cfi_def_cfa %ebp,4\n\t")