[corlib] Avoid unbounded resizes of ephemeron arrays
authorVlad Brezae <brezaevlad@gmail.com>
Fri, 6 Jan 2017 00:46:29 +0000 (02:46 +0200)
committerVlad Brezae <brezaevlad@gmail.com>
Wed, 11 Jan 2017 11:21:59 +0000 (13:21 +0200)
commita3b053bacf4436f213391b9776d2ab89b8cf3ff7
treec4a39feae731670dc254db430c77cc47af6fe565
parent0007e99a87229eab592c179430c4fe3d885e1363
[corlib] Avoid unbounded resizes of ephemeron arrays

We compute the size of the array based on how many live ephemerons it stores, and not based on the previous size of the array which doesn't indicate anything.

Fixes leak from #47388.
mcs/class/corlib/System.Runtime.CompilerServices/ConditionalWeakTable.cs