The current implementation of the DEFAULT_STACK_SIZE app property parses with a radix of 16 and is not documented anywhere, but is used by ASP.NET in ANCM scenarios. We should update the name to follow the convention and officially document the setting at https://learn.microsoft.com/dotnet/core/runtime-config/threading.
Lookup:
|
if (u16_strcmp(pPropertyNames[i], W("DEFAULT_STACK_SIZE")) == 0) |
|
{ |
|
extern void ParseDefaultStackSize(LPCWSTR value); |
|
ParseDefaultStackSize(pPropertyValues[i]); |
|
} |
Parsing:
|
void ParseDefaultStackSize(LPCWSTR valueStr) |
|
{ |
|
if (valueStr) |
|
{ |
|
LPWSTR end; |
|
errno = 0; |
|
unsigned long value = u16_strtoul(valueStr, &end, 16); // Base 16 without a prefix |
|
|
|
if ((errno == ERANGE) // Parsed value doesn't fit in an unsigned long |
|
|| (valueStr == end) // No characters parsed |
|
|| (end == nullptr) // Unexpected condition (should never happen) |
|
|| (end[0] != 0)) // Unprocessed terminal characters |
|
{ |
|
ThrowHR(E_INVALIDARG); |
|
} |
|
else |
|
{ |
|
s_defaultStackSizeProperty = value; |
|
} |
|
} |
|
} |
The current implementation of the
DEFAULT_STACK_SIZEapp property parses with a radix of 16 and is not documented anywhere, but is used by ASP.NET in ANCM scenarios. We should update the name to follow the convention and officially document the setting at https://learn.microsoft.com/dotnet/core/runtime-config/threading.System.Threading.DefaultStackSize?Lookup:
runtime/src/coreclr/vm/corhost.cpp
Lines 614 to 618 in cc80345
Parsing:
runtime/src/coreclr/vm/threads.cpp
Lines 2045 to 2065 in cc80345