lkml.org 
[lkml]   [2008]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: KVM overflows the stack
    From
    Date
    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    [W:0.068 / U:0.084 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site