Do not use `AllocateUninitializedArray` in private array pools. (dotnet/coreclr#26338)
authorVladimir Sadov <vsadov@microsoft.com>
Mon, 26 Aug 2019 02:14:06 +0000 (19:14 -0700)
committerStephen Toub <stoub@microsoft.com>
Mon, 26 Aug 2019 02:14:06 +0000 (22:14 -0400)
commite421481eb822c6d3d69e1deba7eab12d56ab77f7
treeec8d58c5675b9341c7d09a3aa611da378a8abeaf
parent2c8e1fff2d2324a3614f070c3f72c0b46473c6ae
Do not use `AllocateUninitializedArray` in private array pools. (dotnet/coreclr#26338)

User may have extra expectations for the privatly owned array pools.
For example there could be an expectation that array never contains negative numbers (since user never puts them there). Uninitialized allocations can break such expectations.

Commit migrated from https://github.com/dotnet/coreclr/commit/c89fd6f88744bfee034e792906700c5a17e1b953
src/libraries/System.Private.CoreLib/src/System/Buffers/ConfigurableArrayPool.cs