LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices



Reply
 
Search this Thread
Old 11-29-2012, 11:49 PM   #1
zvivered
Member
 
Registered: Sep 2007
Posts: 119

Rep: Reputation: 15
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
 
Old 11-30-2012, 07:47 AM   #2
pan64
Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 5,166

Rep: Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364Reputation: 1364
probably you can try valgrind: http://valgrind.org/
 
Old 12-02-2012, 02:14 PM   #3
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,539

Rep: Reputation: 149Reputation: 149
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Thread overran stack, or stack corrupted rrlangly Linux - Kernel 1 12-21-2011 12:04 AM
LXer: Ubuntu Linux solution stack implementation, Part 4: Solution stack setup and integration LXer Syndicated Linux News 0 08-18-2010 04:50 AM
single 8K process stack vs 4K process stack and a seperate 4K interrupt stack charvak Linux - Kernel 1 03-17-2010 07:58 PM
Difference b/t Kernel stack and User stack hazzyb Linux - Software 2 09-29-2008 08:40 PM
Boot disk; check. CD in drive; check. Doesn't work; check. Hal DamnSmallLinux 7 02-04-2004 03:10 AM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration