Changeset 97863 in vbox for trunk/src/VBox/Runtime/common
- Timestamp:
- Dec 23, 2022 5:01:49 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/compiler/vcc/except-x86-vcc.cpp
r97862 r97863 55 55 DECLASM(LONG) rtVccEh4DoFiltering(PFN_EH4_XCPT_FILTER_T pfnFilter, uint8_t const *pbFrame); 56 56 DECLASM(DECL_NO_RETURN(void)) rtVccEh4JumpToHandler(PFN_EH4_XCPT_HANDLER_T pfnHandler, uint8_t const *pbFrame); 57 //DECLASM(void) rtVccEh4DoLocalUnwind(PEXCEPTION_REGISTRATION_RECORD pXcptRegRec, uint32_t uTargetTryLevel,58 // uint8_t const *pbFrame, uintptr_t *pSecurityCookie);59 57 DECLASM(void) rtVccEh4DoGlobalUnwind(PEXCEPTION_RECORD pXcptRec, PEXCEPTION_REGISTRATION_RECORD pXcptRegRec); 60 58 DECLASM(void) rtVccEh4DoFinally(PFN_EH4_FINALLY_T pfnFinally, bool fAbend, uint8_t const *pbFrame); 61 59 62 60 63 static void rtVccEh4DoLocalUnwind(PEXCEPTION_REGISTRATION_RECORD pXcptRegRec, uint32_t uTargetTryLevel, 64 uint8_t const *pbFrame, uintptr_t *pSecurityCookie) 61 /** 62 * Calls the __finally blocks up to @a uTargetTryLevel is reached, starting with 63 * @a pEh4XcptRegRec->uTryLevel. 64 * 65 * @param pEh4XcptRegRec The EH4 exception registration record. 66 * @param uTargetTryLevel The target __try level to stop unwinding at. 67 * @param pbFrame The frame pointer (EBP). 68 */ 69 static void rtVccEh4DoLocalUnwind(PEH4_XCPT_REG_REC_T pEh4XcptRegRec, uint32_t uTargetTryLevel, uint8_t const *pbFrame) 65 70 { 66 71 /* … … 72 77 * Do the unwinding. 73 78 */ 74 PEH4_XCPT_REG_REC_T pEh4XcptRegRec = RT_FROM_MEMBER(pXcptRegRec, EH4_XCPT_REG_REC_T, XcptRec); 75 uint32_t uCurTryLevel = pEh4XcptRegRec->uTryLevel; 79 uint32_t uCurTryLevel = pEh4XcptRegRec->uTryLevel; 76 80 while ( uCurTryLevel != EH4_TOPMOST_TRY_LEVEL 77 81 && ( uCurTryLevel > uTargetTryLevel 78 82 || uTargetTryLevel == EH4_TOPMOST_TRY_LEVEL /* if we knew what 0xffffffff meant, this could probably be omitted */ )) 79 83 { 80 PCEH4_SCOPE_TAB_T const pScopeTable = (PCEH4_SCOPE_TAB_T)(pEh4XcptRegRec->uEncodedScopeTable ^ *pSecurityCookie);84 PCEH4_SCOPE_TAB_T const pScopeTable = (PCEH4_SCOPE_TAB_T)(pEh4XcptRegRec->uEncodedScopeTable ^ __security_cookie); 81 85 PCEH4_SCOPE_TAB_REC_T const pEntry = &pScopeTable->aScopeRecords[uCurTryLevel]; 82 86 … … 108 112 109 113 114 /** 115 * Helper that validates stack cookies. 116 */ 110 117 DECLINLINE(void) rtVccEh4ValidateCookies(PCEH4_SCOPE_TAB_T pScopeTable, uint8_t const *pbFrame) 111 118 { … … 198 205 { 199 206 //RTAssertMsg2("_except_handler4: local unwind\n"); 200 rtVccEh4DoLocalUnwind( &pEh4XcptRegRec->XcptRec, uTryLevel, pbFrame, &__security_cookie);207 rtVccEh4DoLocalUnwind(pEh4XcptRegRec, uTryLevel, pbFrame); 201 208 } 202 209 rtVccEh4ValidateCookies(pScopeTable, pbFrame); … … 226 233 if (pEh4XcptRegRec->uTryLevel != EH4_TOPMOST_TRY_LEVEL) 227 234 { 228 rtVccEh4DoLocalUnwind( &pEh4XcptRegRec->XcptRec, EH4_TOPMOST_TRY_LEVEL, pbFrame, &__security_cookie);235 rtVccEh4DoLocalUnwind(pEh4XcptRegRec, EH4_TOPMOST_TRY_LEVEL, pbFrame); 229 236 rtVccEh4ValidateCookies(pScopeTable, pbFrame); 230 237 }
Note:
See TracChangeset
for help on using the changeset viewer.