Ignore:
Timestamp:
Feb 27, 2003, 6:16:26 PM (22 years ago)
Author:
sandervl
Message:

Don't call WinMessageBox from the unhandled exception filter as that can hang PM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/exceptions.cpp

    r9831 r9868  
    1 /* $Id: exceptions.cpp,v 1.69 2003-02-21 08:50:26 sandervl Exp $ */
     1/* $Id: exceptions.cpp,v 1.70 2003-02-27 17:16:26 sandervl Exp $ */
    22
    33/*
     
    610610                szModName, iObj, offObj);
    611611    }
    612 
     612   
     613/*  This is very dangerous. Can hang PM.
    613614    rc = WinMessageBox(HWND_DESKTOP, HWND_DESKTOP, message, "Application Error",
    614615                       0, MB_ABORTRETRYIGNORE | MB_ERROR);
     
    623624       return WINEXCEPTION_EXECUTE_HANDLER;
    624625    }
     626*/
     627    return WINEXCEPTION_EXECUTE_HANDLER;
    625628}
    626629/*****************************************************************************
     
    12421245            goto continueFail;
    12431246        }
    1244         BOOL ret = map->commitPage(offset, fWriteAccess);
     1247        BOOL ret = map->commitPage(pERepRec->ExceptionInfo[1], offset, fWriteAccess);
    12451248        map->Release();
    12461249        if(ret == TRUE)
     
    13461349    //@@@PH: growing thread stacks might need special treatment
    13471350    case XCPT_GUARD_PAGE_VIOLATION:
    1348         //SvL: don't print anything here -> fatal hang if happens inside fprintf
    1349         //dprintf(("KERNEL32: OS2ExceptionHandler: trying to grow stack (continue search)"));
     1351    {
     1352        //NOTE:!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     1353        //Don't print anything here -> fatal hang if exception occurred
     1354        //inside fprintf
     1355        //NOTE:!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     1356
     1357        Win32MemMap *map;
     1358        BOOL  fWriteAccess = FALSE, ret;
     1359        ULONG offset, accessflag;
     1360
     1361        switch(pERepRec->ExceptionInfo[0]) {
     1362        case XCPT_READ_ACCESS:
     1363                accessflag = MEMMAP_ACCESS_READ;
     1364                break;
     1365        case XCPT_WRITE_ACCESS:
     1366                accessflag = MEMMAP_ACCESS_WRITE;
     1367                fWriteAccess = TRUE;
     1368                break;
     1369        default:
     1370                goto continueGuardException;
     1371        }
     1372
     1373        map = Win32MemMapView::findMapByView(pERepRec->ExceptionInfo[1], &offset, accessflag);
     1374        if(map == NULL) {
     1375            goto continueGuardException;
     1376        }
     1377        ret = map->commitGuardPage(pERepRec->ExceptionInfo[1], offset, fWriteAccess);
     1378        map->Release();
     1379        if(ret == TRUE)
     1380            goto continueexecution;
     1381
     1382continueGuardException:
    13501383        goto continuesearch;
     1384    }
    13511385
    13521386
Note: See TracChangeset for help on using the changeset viewer.