Re: Catch stack overflow in an application
- From: "Bruce Eitman [eMVP]" <beitman.nospam@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 30 Aug 2007 08:23:15 -0400
That is an interesting condition, but it should be caught by the vendor
prior to shipping to you. If not, get a different vendor.
More likely to not be caught:
void VariableBoom( char *InStr )
{
char Str[ 10 ];
int index = 0;
while( *InStr != '\0' )
Str[ index++ ] = *InStr;
}
Where there is no check to see that index >= 10;
I don't think that you really have a good way to catch this or any other
application exception from a driver.
--
Bruce Eitman (eMVP)
Senior Engineer
beitman AT applieddata DOT net
Applied Data Systems
www.applieddata.net
An ISO 9001:2000 Registered Company
Microsoft WEP Gold-level Member
"Grass" <stasdesy@xxxxxxxxx> wrote in message
news:1188463980.069727.242240@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Aug 29, 5:40 pm, "Paul G. Tobey [eMVP]" <p space tobey no spam AT
no instrument no spam DOT com> wrote:
What does the driver have to do with this? A good question on Windows CE
should have: what version of Windows CE! What tools you're using! A
good
description of *what* you are trying to do (not how you've decided to do
it).
As far as I can think, only a debugger would be able to 'catch the stack
overflow condition'. It's unclear to me what the heck you're trying to
do,
though. If these applications are using your driver and are, only when
using your driver, generating stack overflows, you might look for data
that
you are returning to them which you think contains pointers to some other
data, but which can't be right. If the applications generate stack
overflows and your driver has nothing to do with the applications, then
contact the application owners and get them to fix the problem or send
the
source.
Paul T.
"Grass" <stasd...@xxxxxxxxx> wrote in message
news:1188398291.072858.232230@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi All,
I've written a driver that is loaded by devices.exe and want it to
monitor status of some applications. Applications were not written by
me and hence I don't have the source code.
Now, I'd like to catch the stack overflow condition in the monitored
applications. Any idea as to how I can do this.
Sorry for the lack of info. I try to catch stack overflow condition
from my driver in all application running on CE device. I have no
source code for the apps so please don't suggest fixing the apps.
Usually stack overflow in a n application results in stuck device. The
only way to get out of the condition is reset.
I checked it on a few CE devices all stuck on calling the following
code:
void Boom()
{
int BigArr[1024*1024];
BigArr[0] = 1;
}
The SEH does not help either.
Any ideas ?
.
- References:
- Catch stack overflow in an application
- From: Grass
- Re: Catch stack overflow in an application
- From: Paul G. Tobey [eMVP]
- Re: Catch stack overflow in an application
- From: Grass
- Catch stack overflow in an application
- Prev by Date: Re: Adding cloned CalibrUI to BSP
- Next by Date: Re: User defined IOCTL implementation
- Previous by thread: Re: Catch stack overflow in an application
- Next by thread: Re: Catch stack overflow in an application
- Index(es):
Relevant Pages
|