Run-Time Check Failure #2 - Stack around the variable 'szCookieValue' was corrupted 
Author Message
 Run-Time Check Failure #2 - Stack around the variable 'szCookieValue' was corrupted

This problem showed up after migrating our C++ apps to VC 7.0. The code
always worked fine with VC 6.0
This happens in debug build. Looking at the code, I don't find anything
obvious.

I see there are multiple postings regarding this problem. But I couldn't
find any solution. So I am reposting this.

Thanks.
Manoj



Wed, 29 Jun 2005 10:10:48 GMT  
 Run-Time Check Failure #2 - Stack around the variable 'szCookieValue' was corrupted

Quote:
> This problem showed up after migrating our C++ apps to VC 7.0. The code
> always worked fine with VC 6.0
> This happens in debug build. Looking at the code, I don't find anything
> obvious.

> I see there are multiple postings regarding this problem. But I couldn't
> find any solution. So I am reposting this.

AFIAK, all occurrences of this runtime check are from legitimate errors
(even if the code "worked fine" in VC6).  Can you isolate it to a single
function?  Can you post a representative portion of code that illustrates
the problem?

-cd



Wed, 29 Jun 2005 10:44:16 GMT  
 Run-Time Check Failure #2 - Stack around the variable 'szCookieValue' was corrupted

Quote:
>AFIAK, all occurrences of this runtime check are from legitimate errors
>(even if the code "worked fine" in VC6).

Carl,

There's a bug where it can happen using EnC. If the poster isn't doing
any editing while debugging, then chances are it's a real problem.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq



Wed, 29 Jun 2005 18:15:58 GMT  
 Run-Time Check Failure #2 - Stack around the variable 'szCookieValue' was corrupted


Quote:
> >AFIAK, all occurrences of this runtime check are from legitimate errors
> >(even if the code "worked fine" in VC6).

> Carl,

> There's a bug where it can happen using EnC. If the poster isn't doing
> any editing while debugging, then chances are it's a real problem.

That does sound familiar.  There's also a code generation bug that can
manifest itself as RTC #2 in code that might have "worked" under VC6.  My
guess is that the OP isn't encountering either of those.

-cd



Wed, 29 Jun 2005 22:14:10 GMT  
 Run-Time Check Failure #2 - Stack around the variable 'szCookieValue' was corrupted
Actually there was a run time buffer overrun bug in the code, good that VC
7.0 debug build showed the error.

-Manoj



Quote:


> > This problem showed up after migrating our C++ apps to VC 7.0. The code
> > always worked fine with VC 6.0
> > This happens in debug build. Looking at the code, I don't find anything
> > obvious.

> > I see there are multiple postings regarding this problem. But I couldn't
> > find any solution. So I am reposting this.

> AFIAK, all occurrences of this runtime check are from legitimate errors
> (even if the code "worked fine" in VC6).  Can you isolate it to a single
> function?  Can you post a representative portion of code that illustrates
> the problem?

> -cd



Tue, 05 Jul 2005 06:36:12 GMT  
 Run-Time Check Failure #2 - Stack around the variable 'szCookieValue' was corrupted
Hi,
  I ran into the same problem.  the "solution" was to change the scope of the variable around the "corrupted" variable.  for example i made the scope public to my main.cpp and the problem went away.

hope this helps.

adam.

**********************************************************************

Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...



Sat, 16 Jul 2005 07:33:06 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Run-Time Check Failure #3

2. Run-Time Check Failure #2

3. Re : Strange run-time check failure

4. Strange run-time check failure

5. Run-Time Check Failure in atlimage.h

6. Run-Time Check Failure #3

7. Run-time Check Failure #0

8. run-time check failure #2

9. Run-Time Check Failure #0

10. 'Floating exception' run-time error

11. run-time error '340'

12. Yet another Stack around the variable ''dwSome" was corrupted error

 

 
Powered by phpBB® Forum Software