Commit 7ccae68f authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Fix crash on nested thread exit.

parent 8d773e2c
......@@ -2566,6 +2566,7 @@ __ASM_GLOBAL_FUNC( start_thread,
extern void DECLSPEC_NORETURN call_thread_exit_func( int status, void (*func)(int) );
__ASM_GLOBAL_FUNC( call_thread_exit_func,
"movl 8(%esp),%ecx\n\t"
/* fetch exit frame */
"movl %fs:0x1f4,%edx\n\t" /* x86_thread_data()->exit_frame */
"testl %edx,%edx\n\t"
......@@ -2573,7 +2574,6 @@ __ASM_GLOBAL_FUNC( call_thread_exit_func,
"jmp *%ecx\n\t"
/* switch to exit frame stack */
"1:\tmovl 4(%esp),%eax\n\t"
"movl 8(%esp),%ecx\n\t"
"movl $0,%fs:0x1f4\n\t"
"movl %edx,%ebp\n\t"
__ASM_CFI(".cfi_def_cfa %ebp,4\n\t")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment