LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   How can I check stack is OK ? (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/how-can-i-check-stack-is-ok-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 02:57 PM.