Skip to content
Merged
Prev Previous commit
Next Next commit
Added some additional asserts
  • Loading branch information
mrsharm authored and github-actions committed Apr 3, 2024
commit 116d3071af00301591f9c36b4dd8733c6a738b5e
2 changes: 2 additions & 0 deletions src/coreclr/gc/unix/gcenv.unix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,7 @@ static size_t GetLogicalProcessorCacheSizeFromOS()
if (success)
{
assert(cacheSizeFromSysctl > 0);
assert(cacheSizeFromSysctl != SIZE_MAX);
cacheSize = ( size_t) cacheSizeFromSysctl;
}
}
Expand Down Expand Up @@ -937,6 +938,7 @@ static size_t GetLogicalProcessorCacheSizeFromOS()
}
#endif

assert (cacheSize != SIZE_MAX);
return cacheSize;
}

Expand Down