CPalThread::GetThreadId returns a SIZE_T and the value is used to fill the lpThreadId parameter in InternalCreateThread(). On 64-bit platforms, SIZE_T is 64-bit wide. lpThreadId is an LPDWORD and points to a 32-bit wide variable. This causes a value truncation here: https://github.com/dotnet/coreclr/blob/04d31b78087aadc1399cb52df4c0a4795bfdb23f/src/pal/src/thread/thread.cpp#L737