BoundsChecker error: Writing overflows memory 
Author Message
 BoundsChecker error: Writing overflows memory


I'm currently porting a program from Borland C++ to VC++ 6.0. The ported
application runs ok, but BoundsChecker with FinalCheck enabled reports
the following error:

Writing overflows memory: PTR: 0x........

Obviously this is not good, but the problem is that this error is while
constructing an object created using 'new', without any code actually
having been executed. The code uses an old Windows class lib that I
wrote myself and have been using for several years. This is what the
call stack looks like:

====== Call Stack (most recently called function) =======

   RWindow::RWindow(RWindow& parent) : BackgroundColor(RColor::Default),

>>    {

      Parent= &parent;      // Store pointer to parentwindow object


   RDialogBox::RDialogBox(char *szCaption, RWindow& parent, int create)
                       : RWindow(parent), CreatedBySystem(false)

>>    {

      strcpy(RealCaption, "");


   MyDialog::MyDialog(RWindow& parent) : RDialogBox("", parent, FALSE)

>>    {

                        "Creating dialog.");
      // Remainder of function removed for debugging


>> MyDialog* dialog=new MyDialog(window);

====== End of Call Stack =======

The >> signs indicate where execution was at the time BoundsChecker
reported the error. As you can see, none of the actual code has
executed, and RWindow::RWindow is initializing its members. These are
all simple enum and pointer types that are initialized to NULL and other
sensible values. In fact this is done several times before with other
windows that were created before this current dialog.

At this moment I have no idea what may be causing the 'Writing overflows
memory' error to be reported by BoundsChecker. Can anyone tell me what
may be causing this problem? If this question is not appropriate for
this group, could someone please direct me to the proper place to ask
such questions and perhaps other BoundsChecker related issues?

Thanks in advance for any help,

Arjan van Gog

Sat, 11 May 2002 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. memory overflow and heapcorrupt and stack memory

2. runtime memory checking (aka Who Competes with BoundsChecker)

3. Purify .vs. Boundschecker for COM/BSTR memory leaks

4. BoundsChecker report memory leak on SafeArrayCreate...?

5. BoundsChecker(1) Memory Leaks in DLLs

6. BoundsChecker(2): DLL and memory leaks

7. Help: memory corruption (BoundsChecker??)

8. BoundsChecker finding strange memory leak.

9. Boundschecker shows: Dynamic memory overrun, afxtls.cpp line 83

10. MSVCRTD.DLL: Dynamic Memory Overrun (Boundschecker).

11. Boundschecker shows: Dynamic memory overrun, afxtls.cpp line 83

12. Help: memory corruption (BoundsChecker??)


Powered by phpBB® Forum Software