apparently my post is a bit wrong, see Gaurav's posts. That said, I found the following in arch/i386/kernel/irq.c #ifdef CONFIG_DEBUG_STACKOVERFLOW /* Debugging check for stack overflow: is there less than 1KB free? */ { long esp; __asm__ __volatile__("andl %%esp,%0" : "=r" (esp) : "0" (THREAD_SIZE - 1)); if (unlikely(esp < (sizeof(struct thread_info) + STACK_WARN))) { printk("do_IRQ: stack overflow: %ld\n", esp - sizeof(struct thread_info)); dump_stack(); } } #endif is that what you are looking for? On Wed, 29 Sep 2004 11:24:49 +0200, Stephane List <slist@xxxxxxxxxxx> wrote: > > >IIUC a kernel module uses the kernel's stack and heap. And because of > >this modules which use a lot of stack space can cause some serious > >problems. > > > > > > > Does Linux provide a mecanism to panic in case of stack or heap overflow ? > If I run Linux in an emulator, is there a thing I could trace to detect > such problem ? > > Thanks > > Stephane > > > > -- > Kernelnewbies: Help each other learn about the Linux kernel. > Archive: http://mail.nl.linux.org/kernelnewbies/ > FAQ: http://kernelnewbies.org/faq/ > > -- Brandon Niemczyk http://bniemczyk.doesntexist.com -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/