LinuxQuestions.org

LinuxQuestions.org (http://www.linuxquestions.org/questions/index.php)
-   Linux - Embedded & Single-board computer (http://www.linuxquestions.org/questions/forumdisplay.php?f=78)
-   -   How can I check stack is OK ? (http://www.linuxquestions.org/questions/showthread.php?t=4175439395)

zvivered 11-29-2012 10:49 PM

How can I check stack is OK ?
 
Hello,

I'm developing a C++ application that runs under vanilla 2.6.27.35 with busybox 1.14.1

The application is one process divided into 8 threads.

The stack allocated for a thread is 256KB

What tool can I use to make sure that my stack is big enough ?

I suspect that in a specific scenario the stack overflows.

Thanks,
Zvika

pan64 11-30-2012 06:47 AM

probably you can try valgrind: http://valgrind.org/

Mara 12-02-2012 01:14 PM

Compile your program with -fstack-check. GCC will add some stack protection code. Valgrind is a good tool too. Using the two you should be able to detect most of the problems.


All times are GMT -5. The time now is 09:09 AM.