Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
[x86/Linux] Mark several Windows-specific functions in excepx86.cpp a…
Browse files Browse the repository at this point in the history
…s NYI (#8424)

* Mark several Windows-specific functions as NYI

* Use FEATURE_PAL instead of PLATFORM_UNIX

* Revert the change in threads.h
  • Loading branch information
parjong authored and janvorli committed Dec 6, 2016
1 parent 4e21d57 commit 61ffc9f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/vm/i386/excepx86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ CPFH_AdjustContextForThreadSuspensionRace(CONTEXT *pContext, Thread *pThread)
{
WRAPPER_NO_CONTRACT;

#ifndef FEATURE_PAL
PCODE f_IP = GetIP(pContext);
if (Thread::IsAddrOfRedirectFunc((PVOID)f_IP)) {

Expand Down Expand Up @@ -429,6 +430,9 @@ CPFH_AdjustContextForThreadSuspensionRace(CONTEXT *pContext, Thread *pThread)
SetIP(pContext, GetIP(pThread->m_OSContext) - 1);
STRESS_LOG1(LF_EH, LL_INFO100, "CPFH_AdjustContextForThreadSuspensionRace: Case 4 setting IP = %x\n", pContext->Eip);
}
#else
PORTABILITY_ASSERT("CPFH_AdjustContextForThreadSuspensionRace");
#endif
}
#endif // FEATURE_HIJACK

Expand Down Expand Up @@ -2009,12 +2013,17 @@ PEXCEPTION_REGISTRATION_RECORD GetCurrentSEHRecord()

PEXCEPTION_REGISTRATION_RECORD GetFirstCOMPlusSEHRecord(Thread *pThread) {
WRAPPER_NO_CONTRACT;
#ifndef FEATURE_PAL
EXCEPTION_REGISTRATION_RECORD *pEHR = *(pThread->GetExceptionListPtr());
if (pEHR == EXCEPTION_CHAIN_END || IsUnmanagedToManagedSEHHandler(pEHR)) {
return pEHR;
} else {
return GetNextCOMPlusSEHRecord(pEHR);
}
#else // FEATURE_PAL
PORTABILITY_ASSERT("GetFirstCOMPlusSEHRecord");
return NULL;
#endif // FEATURE_PAL
}


Expand All @@ -2040,7 +2049,11 @@ PEXCEPTION_REGISTRATION_RECORD GetPrevSEHRecord(EXCEPTION_REGISTRATION_RECORD *n
VOID SetCurrentSEHRecord(EXCEPTION_REGISTRATION_RECORD *pSEH)
{
WRAPPER_NO_CONTRACT;
#ifndef FEATURE_PAL
*GetThread()->GetExceptionListPtr() = pSEH;
#else // FEATURE_PAL
_ASSERTE("NYI");
#endif // FEATURE_PAL
}


Expand Down Expand Up @@ -2077,6 +2090,7 @@ BOOL PopNestedExceptionRecords(LPVOID pTargetSP, BOOL bCheckForUnknownHandlers)
STATIC_CONTRACT_GC_NOTRIGGER;
STATIC_CONTRACT_SO_TOLERANT;

#ifndef FEATURE_PAL
PEXCEPTION_REGISTRATION_RECORD pEHR = GetCurrentSEHRecord();

while ((LPVOID)pEHR < pTargetSP)
Expand Down Expand Up @@ -2132,6 +2146,10 @@ BOOL PopNestedExceptionRecords(LPVOID pTargetSP, BOOL bCheckForUnknownHandlers)
SetCurrentSEHRecord(pEHR);
}
return FALSE;
#else // FEATURE_PAL
PORTABILITY_ASSERT("PopNestedExceptionRecords");
return FALSE;
#endif // FEATURE_PAL
}

//
Expand Down

0 comments on commit 61ffc9f

Please sign in to comment.