Error diagnosis

S

SteveB

Hello All

We have an app that was written a few years ago in which the developers

wrote an entire exception handling system.


I have a problem with the following line if code:


OutStream << L" (+ " << std::dec <<
static_cast<DWORD>(Disp64) << L" bytes), ";


This is throwing the following exception:


Run-Time Check Failure #2 - Stack around the variable 'stIHM' was
corrupted.


I was wondering if anyone could interpret what the line of code is
actually doing and what the error means - a Google search has proved
fruitless


Thanks


Steve
 
D

Daniel T.

SteveB said:
We have an app that was written a few years ago in which the
developers

wrote an entire exception handling system.

I have a problem with the following line if code:

OutStream << L" (+ " << std::dec <<
static_cast<DWORD>(Disp64) << L" bytes), ";


This is throwing the following exception:

Run-Time Check Failure #2 - Stack around the variable 'stIHM' was
corrupted.

I was wondering if anyone could interpret what the line of code is
actually doing and what the error means - a Google search has proved
fruitless

What the line of code is actually doing depends on what type OutStream
is and how the op<<'s have been defined.

Based on the wording, I assume the error means that some piece of code
is clobbering your stack (i.e., writing to memory it doesn't have rights
to.) To find the real meaning, you will have to investigate your code
and or ask in a newsgroup that discusses your runtime system.
 
J

Jacek Dziedzic

SteveB said:
Hello All

We have an app that was written a few years ago in which the developers

wrote an entire exception handling system.


I have a problem with the following line if code:


OutStream << L" (+ " << std::dec <<
static_cast<DWORD>(Disp64) << L" bytes), ";


This is throwing the following exception:


Run-Time Check Failure #2 - Stack around the variable 'stIHM' was
corrupted.


I was wondering if anyone could interpret what the line of code is
actually doing and what the error means - a Google search has proved
fruitless

My bet is that you overwrite memory somewhere else and here
only the error is discovered.

<OT>You might want to use a tool such as electricfence or valgrind
to find the exact spot.
</OT>

HTH,
- J.
 
S

SteveB

Jacek said:
My bet is that you overwrite memory somewhere else and here
only the error is discovered.

<OT>You might want to use a tool such as electricfence or valgrind
to find the exact spot.
</OT>

HTH,
- J.

I'll look into these apps, thanks

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top