lkml.org 
[lkml]   [2001]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: stack overflow?
Date
On Wednesday 26 September 2001 15:29, you wrote:
> Christian Widmer wrote:
> > hi
> >
> > i saw very strange behaviour when debuging my modules and i start to
> > think about stack overflow. i know that the kernel stack of eache process
> > is some what smaller than 8KB. but how big is the kernelstack during
> > interrupt time when executing tasklets?
>
> Depends on the architecture, but on the x86 there is no stack switch
> when you receive an interrupt in kernel mode. Thus, if too many
> interrupts occur you could potentially overflow the stack. If
> interrupted from user mode the stack switches to the top of the kernel
> stack.

thanks
i could verify that it was a stackoverflow. but this was due to an
unexpected behaviour of gcc not because of too may interrupts :)
i realiesd that when i had a look at the assemby output of my code.
i had a macro that defined its local variables (256 byte). this macro
was used n times and gcc allocates n * 256 bytes at the function entry
point also it actualy only needs 256 byte. is his allocation strategy
not silly?

chris

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:03    [W:0.062 / U:2.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site