X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Farch%2Fx86%2Fproc.c;h=62980674215919ebd538b0ee2ce2f0403e2c1795;hb=eb934b266052965b9c480d11d6866a994f30731b;hp=3b5ceb2fbfd4edf8060a1699b306d99c7b2c3e61;hpb=54746c855c6e2fe42fde9f93b0ce3f41aeefc2e5;p=tpg%2Facess2.git diff --git a/Kernel/arch/x86/proc.c b/Kernel/arch/x86/proc.c index 3b5ceb2f..62980674 100644 --- a/Kernel/arch/x86/proc.c +++ b/Kernel/arch/x86/proc.c @@ -779,6 +779,14 @@ void Proc_Scheduler(int CPU) #else __asm__ __volatile__ ("mov %0, %%cr3"::"a"(thread->MemState.CR3)); #endif + + #if 0 + if(thread->SavedState.ESP > 0xC0000000 + && thread->SavedState.ESP < thread->KernelStack-0x2000) { + Log_Warning("Proc", "Possible bad ESP %p (PID %i)", thread->SavedState.ESP); + } + #endif + // Switch threads __asm__ __volatile__ ( "mov %1, %%esp\n\t" // Restore ESP