Changeset 97866 in vbox for trunk/src/VBox/Runtime/include
- Timestamp:
- Dec 26, 2022 2:14:08 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/include/internal/compiler-vcc.h
r96588 r97866 108 108 void rtVccTermRunAtExit(void) RT_NOEXCEPT; 109 109 110 struct _CONTEXT; 111 void rtVccCheckContextFailed(struct _CONTEXT *pCpuCtx); 112 113 #ifdef _CONTROL_FLOW_GUARD 114 DECLASM(void) __guard_check_icall_nop(uintptr_t); /**< nocrt-guard-win.asm */ 115 #endif 116 extern uintptr_t __guard_check_icall_fptr; /**< nocrt-guard-win.asm */ 110 117 111 118 RT_C_DECLS_END 112 119 113 120 121 /** 122 * Checks if CFG is currently active. 123 * 124 * This requires CFG to be enabled at compile time, supported by the host OS 125 * version and activated by the module loader. 126 * 127 * @returns true if CFG is active, false if not. 128 */ 129 DECLINLINE(bool) rtVccIsGuardICallChecksActive(void) 130 { 131 #ifdef _CONTROL_FLOW_GUARD 132 return __guard_check_icall_fptr != (uintptr_t)__guard_check_icall_nop; 133 #else 134 return false; 135 #endif 136 } 137 138 139 #ifdef IPRT_INCLUDED_nt_nt_h 140 /** 141 * Checks if a pointer is on the officially registered stack or not. 142 * 143 * @returns true if on the official stack, false if not. 144 * @param uStackPtr The pointer to check. 145 */ 146 DECLINLINE(bool) rtVccIsPointerOnTheStack(uintptr_t uStackPtr) 147 { 148 PNT_TIB const pTib = (PNT_TIB)RTNtCurrentTeb(); 149 return uStackPtr <= (uintptr_t)pTib->StackBase 150 && uStackPtr >= (uintptr_t)pTib->StackLimit; 151 } 152 #endif 153 114 154 #endif /* !IPRT_INCLUDED_INTERNAL_compiler_vcc_h */ 115 155
Note:
See TracChangeset
for help on using the changeset viewer.