diff --git a/src/core/arm/nce/arm_nce.cpp b/src/core/arm/nce/arm_nce.cpp index a2a47bf003..66213a7d16 100644 --- a/src/core/arm/nce/arm_nce.cpp +++ b/src/core/arm/nce/arm_nce.cpp @@ -625,15 +625,7 @@ void ArmNce::Initialize() { }); #else static std::once_flag flag; - std::call_once(flag, [] { - // Initialize exception handler - AddVectoredExceptionHandler(1, VectoredExceptionHandler); - - // Disable control flow guard to allow context switching to guest code without causing a security error - PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY cfg_policy{}; - cfg_policy.EnableControlFlowGuard = 0; - SetProcessMitigationPolicy(ProcessControlFlowGuardPolicy, &cfg_policy, sizeof(cfg_policy)); - }); + std::call_once(flag, [] { AddVectoredExceptionHandler(1, VectoredExceptionHandler); }); #endif }