You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 1, 2020. It is now read-only.
On 32 bit architectures, size_t is an unsigned 32 bit integer, and therefore the condition can never be true. On clang5.0, this becomes a warning and blocks the build.
/corert/src/Native/gc/unix/cgroup.cpp:440:31: error: comparison of constant 9223372032559808512 with expression of type 'size_t' (aka 'unsigned int') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
if (physical_memory_limit > 0x7FFFFFFF00000000)
~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~
1 error generated.
Here is the associated code:
// If there's no memory limit specified on the container this
// actually returns 0x7FFFFFFFFFFFF000 (2^63-1 rounded down to
// 4k which is a common page size). So we know we are not
// running in a memory restricted environment.
if (physical_memory_limit > 0x7FFFFFFF00000000)
{
return 0;
}
All we have to do is to figure out what would be returned on an unrestricted 32-bit execution environment. I have tried it on a physical arm32 device, without being inside a Docker container, it returned 0 because FindHierarchyMount finds nothing.
According to this thread, it appears to me that for 32-bits architectures, we should probably check against a different constant, I haven't figured that out yet.