diff --git a/Python/ceval.c b/Python/ceval.c index fbea1f67a36f442..7cf1f975a983515 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -131,7 +131,9 @@ hardware_stack_limits(uintptr_t *base, uintptr_t *top, uintptr_t sp) GetCurrentThreadStackLimits(&low, &high); *top = (uintptr_t)high; ULONG guarantee = 0; +#ifdef MS_WINDOWS_DESKTOP SetThreadStackGuarantee(&guarantee); +#endif *base = (uintptr_t)low + guarantee; #elif defined(__APPLE__) pthread_t this_thread = pthread_self();