Changeset 1078 for trunk/dll/objwin.c


Ignore:
Timestamp:
Jul 19, 2008, 6:08:02 AM (17 years ago)
Author:
Steven Levine
Message:

More Fortify infrastructure enhancements
Rework Fortify_SetOwner
Add Fortify_BecomeOwner
Avoid more spurious leak reports

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/objwin.c

    r1077 r1078  
    2525#include "arccnrs.h"                    // ArcObjWndProc
    2626#include "errutil.h"                    // Win_Error
     27#include "fortify.h"
     28#ifdef FORTIFY
     29#include "misc.h"                       // GetTidForThread
     30#endif
    2731#include "fm3dll.h"
    28 #include "fortify.h"
    2932
    3033static PSZ pszSrcFile = __FILE__;
     
    9699          for (i = 0; WinIsWindow(hab2, hwndCnr) && i < 10; i++)
    97100            DosSleep(50);
    98           Fortify_LeaveScope();
     101          for (;;) {
     102            UCHAR scope = Fortify_LeaveScope();
     103            if ((CHAR)scope == 0)
     104              break;
     105            Runtime_Error(pszSrcFile, __LINE__, "Attempting to exit thread %u with scope non-zero (%u)",
     106                          GetTidForThread(), scope);
     107            if ((CHAR)scope < 0)
     108              break;
     109          }
    99110        }
    100111#       endif
Note: See TracChangeset for help on using the changeset viewer.