Do not use `AllocateUninitializedArray` in private array pools. (#26338) (#26366)
authorStephen Toub <stoub@microsoft.com>
Mon, 26 Aug 2019 21:25:15 +0000 (17:25 -0400)
committerGitHub <noreply@github.com>
Mon, 26 Aug 2019 21:25:15 +0000 (17:25 -0400)
commit6f87fd8ded73f01f60df5af02eede184bacc6fe4
treeaf9fe385909de4a2fcba66dd954eb5512b5c24a6
parent654cd7e0d39c16fe3adec6f67a27eb3b1304c35d
Do not use `AllocateUninitializedArray` in private array pools. (#26338) (#26366)

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.
src/System.Private.CoreLib/shared/System/Buffers/ConfigurableArrayPool.cs