Suspected Stack Overflow - how to detect/confirm?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Suspected Stack Overflow - how to detect/confirm?

ソリューションへジャンプ
1,207件の閲覧回数
mykepredko
Contributor IV

Hi Folks,

 

In the main process of my application, inside one function, I call another function which uses the tty(b) driver to send out an ASCIIZ string.  When this function is called, the app crashes (and causes a segmentation fault on my PC which is running CW when I'm debugging - which is strange). 

 

However, if the error condition which causes the upchuck during the tty write does not occur, execution continues normally - in fact, the tty ASCIIZ function is called later in the program to give a status and there are no issues. 

 

I suspect that I have a stack issue in the main process - is there any way to confirm that this is what's happening? 

 

Does anybody have any ideas why CW has the crash as well? 

 

Thanx,

 

myke

0 件の賞賛
1 解決策
537件の閲覧回数
LordMark
Contributor IV

You may try to use the task aware debugging (TAD) in codewarrior. It shows you the stack memory and stack overflow situations.

元の投稿で解決策を見る

0 件の賞賛
2 返答(返信)
538件の閲覧回数
LordMark
Contributor IV

You may try to use the task aware debugging (TAD) in codewarrior. It shows you the stack memory and stack overflow situations.

0 件の賞賛
537件の閲覧回数
mykepredko
Contributor IV

Hi Mark,

 

Thank you - that sounds like a good suggestion.

 

I increased the task's stack by 256 bytes and the problem has gone away.

 

I'm still curious as to why I had the problem with CW and the PC it is running on - anybody have any ideas? 

 

myke

0 件の賞賛