lkml.org 
[lkml]   [2008]   [Jul]   [17]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: KVM overflows the stack
FromDave Hansen <>
DateWed, 16 Jul 2008 23:14:48 -0700
On Thu, 2008-07-17 at 08:52 +0300, Avi Kivity wrote:
> Dave Hansen wrote:> > Avi, how would you like this fixed?  I'd be happy to prepare some
> > patches.  Do you have a particular approach that you think we should
> > use?  Just make the big objects dynamically allocated?
> > > > Yes, things like kvm_lapic_state are way too big to be on the stack.  
> There's an additional problem here, that apparently your gcc (which 
> version?) doesn't fold objects in a switch statement into the same stack 
> slot:

$ gcc -v
gcc version 3.4.6 (Ubuntu 3.4.6-6ubuntu5)

> switch (...) {>     case x: {
>          struct medium a;
>          ...
>     }
>     case y:
>           struct medium b;
>           ...
>     }
> };
> 
> These could be solved either by stack allocation, or by moving into 
> functions marked noinline.  Whichever is easier.

Did you mean dynamic allocation? :)

-- Dave



\
 
 \ /
  Last update: 2008-07-17 08:17    [from the cache]
©2003-2008