diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2025-04-30 15:14:49 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2025-04-30 15:14:49 +1000 |
commit | a521dc5c74d54466dd3fc432057b96c30504a748 (patch) | |
tree | 8240eff0bdf1aba309c27ed0a9e772a2db43e425 /source/core/StarThread_windows.cpp | |
parent | d8db6199e13b5405123f18cc1a9631f7e7f4794a (diff) |
Guarantee stack space in exception handling so printing stack overflows doesn't fail
Diffstat (limited to 'source/core/StarThread_windows.cpp')
-rw-r--r-- | source/core/StarThread_windows.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/core/StarThread_windows.cpp b/source/core/StarThread_windows.cpp index a7d09be..b63101d 100644 --- a/source/core/StarThread_windows.cpp +++ b/source/core/StarThread_windows.cpp @@ -46,6 +46,8 @@ struct ThreadImpl { static DWORD WINAPI runThread(void* data) { ThreadImpl* ptr = static_cast<ThreadImpl*>(data); try { + unsigned long exceptionStackSize = 16384; + SetThreadStackGuarantee(&exceptionStackSize); ptr->function(); } catch (std::exception const& e) { if (ptr->name.empty()) |