示例#1
0
AutoCleanupDisableBackoutStackValidation::AutoCleanupDisableBackoutStackValidation()
{
    WRAPPER_CONTRACT;
    STATIC_CONTRACT_DEBUG_ONLY;

    m_fAlreadyDisabled = GetClrDebugState()->m_StackMarkerStack.IsDisabled();
    if (!m_fAlreadyDisabled)
    {
        GetClrDebugState()->m_StackMarkerStack.RareDisableStackMarkers();
    }
}
示例#2
0
        WinWrapperContract(const char *szFunction, const char *szFile, int lineNum)
        {
            CANNOT_HAVE_CONTRACT;

            m_pClrDebugState = NULL;
            
            if (gWinWrapperContractRecursionBreak)
            {
                return;
            }

            m_pClrDebugState = GetClrDebugState();

            // Save old debug state
            m_IncomingClrDebugState = *m_pClrDebugState;


            m_pClrDebugState->ViolationMaskReset( ThrowsViolation );

            if (m_pClrDebugState->IsFaultForbid() && !(m_pClrDebugState->ViolationMask() & (FaultViolation|FaultNotFatal|BadDebugState)))
            {
                gWinWrapperContractRecursionBreak = TRUE;

                CONTRACT_ASSERT("INJECT_FAULT called in a FAULTFORBID region.",
                                Contract::FAULT_Forbid,
                                Contract::FAULT_Mask,
                                szFunction,
                                szFile,
                                lineNum
                                );
            }

            
        };
示例#3
0
DebugSOIntolerantTransitionHandler::DebugSOIntolerantTransitionHandler(EEThreadHandle thread)
    : SOIntolerantTransitionHandler(thread)
{
    m_clrDebugState = GetClrDebugState();
    if (m_clrDebugState)
    {
        m_prevSOTolerantState = m_clrDebugState->BeginSOIntolerant();
    }
}
示例#4
0
//
// EnsureSOTolerant ASSERTS if we are not in an SO-tolerant mode
//
void EnsureSOTolerant()
{
    ClrDebugState *pClrDebugState = GetClrDebugState();
    _ASSERTE(! pClrDebugState || pClrDebugState->IsSOTolerant());
}