Skip to content
Merged
Changes from 1 commit
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
17 changes: 9 additions & 8 deletions src/coreclr/vm/threads.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6134,21 +6134,22 @@ HRESULT Thread::CLRSetThreadStackGuarantee(SetThreadStackGuaranteeScope fScope)
//
EXTRA_PAGES = 3;
INDEBUG(EXTRA_PAGES += 1);
#else // HOST_64BIT
#ifdef _DEBUG
uGuardSize += (1 * GetOsPageSize()); // one extra page for debug infrastructure
#endif // _DEBUG
#endif // HOST_64BIT

int ThreadGuardPages = CLRConfig::GetConfigValue(CLRConfig::EXTERNAL_ThreadGuardPages);
if (ThreadGuardPages == 0)
if (ThreadGuardPages != 0)
{
uGuardSize += (EXTRA_PAGES * GetOsPageSize());
uGuardSize += (ThreadGuardPages * GetOsPageSize());
}
#if defined(HOST_64BIT)
else
{
uGuardSize += (ThreadGuardPages * GetOsPageSize());
uGuardSize += (EXTRA_PAGES * GetOsPageSize());
}

#else // HOST_64BIT
#ifdef _DEBUG
uGuardSize += (1 * GetOsPageSize()); // one extra page for debug infrastructure
#endif // _DEBUG
#endif // HOST_64BIT

LOG((LF_EH, LL_INFO10000, "STACKOVERFLOW: setting thread stack guarantee to 0x%x\n", uGuardSize));
Expand Down
Loading