Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Python/ceval.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, since SetThreadStackGuarantee isn't available for UWP, we can't use it here, but since

Sets the minimum size of the stack associated with the calling thread or fiber that will be available during any stack overflow exceptions. This is useful for handling stack overflow exceptions; the application can safely use the specified number of bytes during exception handling.

we'd lose that in case of UWP :(

I think this ok, cc @markshannon?

SetThreadStackGuarantee(&guarantee);
#endif
*base = (uintptr_t)low + guarantee;
#elif defined(__APPLE__)
pthread_t this_thread = pthread_self();
Expand Down
Loading