AnsweredAssumed Answered

Stack overflow detection

Question asked by felix6969 on May 4, 2011
Latest reply on May 23, 2011 by SFernandez

Trying to use the new Stack overflow detection,

I run into kernel_panic immediately at the beginning of the System_Start_Thread_CA.

Call stack shows only

<__KernelPanic>

VDK::Thread::RunFunc((TMK_Thread*)

 

KernelStatus shows kThreadStackOverflow,
PC is at the very beginning of the __dt__22System_Start_Thread_CAFv

 

If I place a breakpoint at the very beginning of System_Start_Thread_CA::Run(),

I can debug to this breakpoint normally:

- Kernel Status NoError, MaxStackUsed(words)=7,

StackSize as specified +45

 

Then I placed a dummy instruction after this very beginning

  int iStop=1; and a breakpoint there.

Even trying to debug to that breakpoint ends up with the same

<__KernelPanic>

VDK::Thread::RunFunc((TMK_Thread*)

 

Before executing the System_Start_Thread,

I think my code could not yet cause a stack overflow,

it seems to come from the instrumentation itself.

 

If I uncheck the ProjectOption "Generate code to catch a stack overflow"

the application works normally.

 

What can be wrong in the settings or code ?? Any idea ?
I would like to use the new Stack overflow detection.

Outcomes