diff --git a/src/kernel/core/arch/x86/arch_thread.c b/src/kernel/core/arch/x86/arch_thread.c index 1f20a5ff3a..3a49bd4475 100755 --- a/src/kernel/core/arch/x86/arch_thread.c +++ b/src/kernel/core/arch/x86/arch_thread.c @@ -189,6 +189,11 @@ arch_thread_enter_uspace(addr entry, void *args, addr ustack_top) // make sure the fpu is in a good state asm("fninit"); + + // access the new stack to make sure the memory page is present + // while interrupts are disabled. + // XXX does this belong there, should caller take care of it? + *(uint32 *)(ustack_top - 8) = 0; disable_interrupts();